This is an automated email from the ASF dual-hosted git repository.
errose28 pushed a commit to branch HDDS-14496-zdu
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/HDDS-14496-zdu by this push:
new 6659199c307 HDDS-15966. Fix flaky
TestScmHAFinalization#testSnapshotFinalization (#11200)
6659199c307 is described below
commit 6659199c307fe52b095ed58c94e6db6eb4e91fc2
Author: Ethan Rose <[email protected]>
AuthorDate: Wed Sep 9 13:29:09 2026 -0400
HDDS-15966. Fix flaky TestScmHAFinalization#testSnapshotFinalization
(#11200)
---
.../org/apache/hadoop/hdds/upgrade/HddsUpgradeTestUtils.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/upgrade/HddsUpgradeTestUtils.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/upgrade/HddsUpgradeTestUtils.java
index e39a68c8010..34a53a15830 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/upgrade/HddsUpgradeTestUtils.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/upgrade/HddsUpgradeTestUtils.java
@@ -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);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]