avijayanhwx commented on a change in pull request #2017:
URL: https://github.com/apache/ozone/pull/2017#discussion_r594619044
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -550,6 +551,23 @@ private void instantiateServices(boolean withNewSnapshot)
throws IOException {
keyManager = new KeyManagerImpl(this, scmClient, configuration,
omStorage.getOmId());
+ if (withNewSnapshot) {
+ Integer layoutVersionInDB = getLayoutVersionInDB();
+ if (layoutVersionInDB != null &&
+ versionManager.getMetadataLayoutVersion() < layoutVersionInDB) {
+ LOG.info("New OM snapshot received with higher layout version {}. " +
+ "Attempting to finalize current OM to that version.",
+ layoutVersionInDB);
+ upgradeFinalizer.finalizeAndWaitForCompletion(
+ "om-ratis-snapshot", this,
+ TimeUnit.SECONDS.toSeconds(10));
Review comment:
Made it configurable.
----------------------------------------------------------------
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]