GlenGeng edited a comment on pull request #2090:
URL: https://github.com/apache/ozone/pull/2090#issuecomment-811774644
> @GlenGeng , can you explain why OzoneContainer#start() needs to be called
multiple times if SCM HA is enabled for registering to the same SCM?
Please check
```
public class SCMConnectionManager
implements Closeable, SCMConnectionManagerMXBean {
private static final Logger LOG =
LoggerFactory.getLogger(SCMConnectionManager.class);
private final ReadWriteLock mapLock;
private final Map<InetSocketAddress, EndpointStateMachine> scmMachines;
```
The SCM Connection will go through `VersionEndpointTask`,
`RegisterEndpointTask` and `HeartbeatEndpointTask`.
Previously, the `VersionEndpointTask#call()` will execute
```
// Start the container services after getting the version
information
ozoneContainer.start(clusterId);
```
If SCM HA is enabled, there will be 3 VersionEndpointTask created, one for
each SCM.
DN will call `VersionEndpointTask#call` for each of them. Yet, we need
ensure that `OzoneContainer` should only be started once.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]