high severityTemporal Workflow SDK (e.g., Java)
Workflow replay fails with `java.lang.IllegalStateException: Version is already set to 1. The most probable cause is retroactive addition of a getVersion call with an existing 'changeId'`. High volume of InternalWorkflowTaskException during replay of EVENT_TYPE_MARKER_RECORDED events. Workflows may self-recover but generate errors.
Root cause
Retroactively adding `Workflow.getVersion(changeId, ...)` to a code path after existing workflow histories have implicitly treated that changeId as version 1 (default). During replay, the new code conflicts with the history's implicit marker in the VersionStateMachine, causing IllegalStateException.
Temporalworkflow versioninggetVersionIllegalStateExceptiondeterminismreplayJava SDK