-
Notifications
You must be signed in to change notification settings - Fork 886
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ErrStateMachineNotFound handling in HSM state replication (#7032)
## What changed? - Modified `HSMStateReplicatorImpl.syncHSMNode()` to handle `ErrStateMachineNotFound` gracefully - Added debug logging with correct field reference to `OriginalExecutionRunId` - Added unit test `TestSyncHSM_StateMachineNotFound` to verify behavior ## Why? After adding support for state deletion in terminal states in Nexus, nightly tests started failing when sync HSM tasks tried to replicate state machines that had been legitimately deleted. Since the deletion is intentional for terminal states, we should gracefully handle these cases by logging and continuing replication of other state machines. ## How did you test it? - Added unit test verifying graceful handling of `ErrStateMachineNotFound` - Existing nightly test failures should be resolved by this change ## Potential risks - If there are cases where a state machine is temporarily unavailable (rather than legitimately deleted), we might incorrectly continue processing - However, based on the HSM implementation, state machines are either present in persistence or not - there is no transient state - Suppressing `ErrStateMachineNotFound` could potentially mask other issues if the error occurs for unexpected reasons ## Documentation No documentation changes required as this is an internal implementation detail handling error cases in the replication path. ## Is hotfix candidate? No - while this fixes test failures, it's not causing production issues that would warrant a hotfix. --------- Co-authored-by: Roey Berman <[email protected]>
- Loading branch information
1 parent
087f4df
commit 536b556
Showing
2 changed files
with
123 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters