Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,20 @@ private static boolean isScmFinalized(StorageContainerManager scm, boolean waitF
try {
dbKeyFlushed = scm.getScmMetadataStore().getMetaTable().get(OzoneConsts.APPARENT_VERSION_KEY) != null;
} catch (RocksDatabaseException | CodecException e) {
throw new RuntimeException(e);
// The metadata RocksDB is briefly closed while a Ratis snapshot install reloads the checkpoint.
// Treat that as "not finalized yet" and let waitFor retry rather than failing the test.
LOG.info("SCM {} metadata DB not readable yet (snapshot install in progress?), will retry.",
scm.getSCMNodeId(), e);
}

LOG.info("Waiting for SCM {} (leader? {}) to finalize.\n" +
"Exited safemode? {}\n" +
"Exited safemode? (not required) {}\n" +
"version manager finalized? {}\n" +
"DB key flushed? {}\n" +
"Requiring DB key to flush? {}",
scm.getSCMNodeId(), scm.checkLeader(), exitedSafemode, isFinalized, dbKeyFlushed, waitForDBKeyFlush);

return exitedSafemode && isFinalized && (!waitForDBKeyFlush || dbKeyFlushed);
// Safemode exit status is included for logging purposes, but SCMs can still finalize while in safemode.
return isFinalized && (!waitForDBKeyFlush || dbKeyFlushed);
}
}
Loading