peterxcli opened a new pull request, #8026:
URL: https://github.com/apache/ozone/pull/8026
## What changes were proposed in this pull request?
Currently `ReplicationManager` start and stop command is only processed by
the leader which will either start or stop the relevant threads as well as set
the flag "running". However, if there is a leader change, the new SCM leader
will not see the previous start / stop subcommand.
We can replicate this start and stop command to the followers so that each
SCM has a consistent view of whether replication should run.
Similar to ContainerBalancer, Make `ReplicationManager` implements
`StatefulService`.
## What has been done
- Only persist start/stop state with manual operation, exclude the SCM stop
service and ReplicationManager constructor cases
- Make few change to make some existing tests pass
- Set the scmContenxt.scm to SCM if it's null, This is used to prevent NPE
for those test init scm with HddsTestUrils.getscm
- remove ServiceManager#start as it's unused
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-11805
## How was this patch tested?
CI:
https://github.com/peterxcli/ozone/actions/runs/13725399354
--
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]