adoroszlai commented on code in PR #5779:
URL: https://github.com/apache/ozone/pull/5779#discussion_r1430167491
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java:
##########
@@ -1333,14 +1334,33 @@ public static boolean scmInit(OzoneConfiguration conf,
// Initialize security if security is enabled later.
initializeSecurityIfNeeded(conf, scmStorageConfig, selfHostName, true);
- if (SCMHAUtils.isSCMHAEnabled(conf) && !isSCMHAEnabled) {
+ if (conf.getBoolean(ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY,
+ ScmConfigKeys.OZONE_SCM_HA_ENABLE_DEFAULT) && !isSCMHAEnabled) {
SCMRatisServerImpl.initialize(scmStorageConfig.getClusterID(),
scmStorageConfig.getScmId(), haDetails.getLocalNodeDetails(),
conf);
scmStorageConfig.setSCMHAFlag(true);
scmStorageConfig.setPrimaryScmNodeId(scmStorageConfig.getScmId());
scmStorageConfig.forceInitialize();
- LOG.debug("Enabled SCM HA");
+
+ /*
+ * Since Ratis is initialized on an existing cluster, we have to
+ * trigger Ratis snapshot so that this SCM can send the latest scm.db
+ * to the bootstrapping SCMs later.
+ */
+
+ try {
+ DefaultConfigManager.forceUpdateConfigValue(
+ ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY, true);
+ StorageContainerManager scm = createSCM(conf);
Review Comment:
@nandakumar131 the exception I showed is from acceptance test, which runs
each component in separate JVM, not from `MiniOzoneCluster`
--
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]