chennaji9 opened a new pull request, #11347:
URL: https://github.com/apache/rocketmq/pull/11347

   <!-- Please make sure the target branch is right. In most case, the target 
branch should be `develop`. -->
   
   ### Which Issue(s) This PR Fixes
   
   Fixes #11338
   
   ### Brief Description
   
   Adds `SyncStateInfoTest`, pinning the controller state-holder's 
defensive-copy and epoch semantics (currently covered only indirectly through 
manager flows):
   
   - initial defaults (epochs 0, empty sync set, no master, first-time elect);
   - `updateMasterInfo` sets the master and advances the master epoch;
   - mutating the set passed to `updateSyncStateSetInfo` after the call does 
not change recorded state (defensive copy in);
   - mutating the set returned by `getSyncStateSet()` does not change recorded 
state (defensive copy out);
   - `removeFromSyncState` removes locally without advancing the sync-state 
epoch.
   
   Test-only change; no production code touched.
   
   ### How Did You Test This Change?
   
   `mvn -pl controller -Dtest=SyncStateInfoTest 
-Dsurefire.failIfNoSpecifiedTests=false test` (JDK 11, PR base commit): `Tests 
run: 5, Failures: 0, Errors: 0`.
   
   🤖 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]

Reply via email to