This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 7fcf3129485 HDDS-16801. Fix intermittent failure in
TestPerVolumePushReplication#testHealthyVolumeReplicationAfterVolumeFailure
(#11452)
7fcf3129485 is described below
commit 7fcf31294859d5d31163e016b5a9a63f21c6edd2
Author: Siyao Meng <[email protected]>
AuthorDate: Fri Oct 9 05:20:47 2026 -0700
HDDS-16801. Fix intermittent failure in
TestPerVolumePushReplication#testHealthyVolumeReplicationAfterVolumeFailure
(#11452)
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
---
.../ozone/container/replication/TestPerVolumePushReplication.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/replication/TestPerVolumePushReplication.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/replication/TestPerVolumePushReplication.java
index a0b27723d5c..11df8fb1bb5 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/replication/TestPerVolumePushReplication.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/replication/TestPerVolumePushReplication.java
@@ -400,7 +400,9 @@ private static void
queueReplicationCommand(MiniOzoneCluster cluster,
ReplicateContainerCommand cmd, DatanodeDetails source) throws
IOException {
DatanodeStateMachine stateMachine =
cluster.getHddsDatanode(source).getDatanodeStateMachine();
StateContext context = stateMachine.getContext();
- context.getTermOfLeaderSCM().ifPresent(cmd::setTerm);
+ // Use the SCM term, not the datanode's: a just restarted datanode has no
term yet, so the command would keep
+ // term 0 and be dropped as stale once the first real SCM command
initializes the term.
+
cmd.setTerm(cluster.getStorageContainerManager().getScmContext().getTermOfLeader());
context.addCommand(cmd);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]