smengcl opened a new pull request, #11751:
URL: https://github.com/apache/ozone/pull/11751
Generated-by: Claude Code (Opus 5.5)
## What changes were proposed in this pull request?
SCM 2.0.x and 2.1.x write SCM Ratis log entries for
`ContainerStateManager.transitionDeletingOrDeletedToClosedState(ContainerID)`
when the leader gets a non-empty replica report for a DELETING or DELETED
container. HDDS-14684 (2.2.0) renamed the method to
`transitionDeletingOrDeletedToTargetState(ContainerID, LifeCycleState)` and
kept nothing under the old name, so the generated
`ContainerStateManagerInvoker.invokeLocal` has no case for it. Applying such an
entry throws `IllegalArgumentException("Method not found: ...")`, which is not
an `SCMException`, so `SCMStateMachine.applyTransaction` terminates the SCM.
The entry stays unapplied, so the SCM terminates again on every restart.
This can hit an SCM on 2.2.x or master that did not apply such an entry
before the upgrade, for example one that was behind its ring on 2.0.x or 2.1.x,
or one stopped uncleanly before a flush or snapshot covered the entry.
Same approach as HDDS-16169:
- `ContainerStateManager` declares
`transitionDeletingOrDeletedToClosedState` again (`@Deprecated` and
`@Replicate`).
- `ContainerStateManagerImpl` delegates it to
`transitionDeletingOrDeletedToTargetState` with CLOSED, which has the same
checks and result as 2.1.
- `ContainerStateManagerInvoker` is regenerated.
No Raft log or proto change.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17451
## How was this patch tested?
- New
`TestContainerStateManager#testApplyLegacyTransitionDeletingOrDeletedToClosedState`
encodes the entry as 2.1 does and applies it through the SCM Ratis server stub
for a DELETING and a DELETED container. It fails with `Method not found`
without the fix and passes with it. A second new test checks that the entry for
a CLOSED container is still rejected with `InvalidContainerStateException`, as
in 2.1.
- `TestContainerStateManager`, `TestContainerManagerImpl`,
`TestSCMStateMachine`, `TestScmInvokerCodeGenerator`,
`TestScmCodecFactoryReplicateCoverage` and `TestReplicationAnnotation` pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]