peterxcli commented on code in PR #11227:
URL: https://github.com/apache/ozone/pull/11227#discussion_r4117774965
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/storage/TestCommitWatcher.java:
##########
@@ -144,26 +147,59 @@ public void shutdown() {
}
}
+ /**
+ * Allocates a RATIS THREE container and waits until SCM's record of its
pipeline names the datanode that
+ * currently leads the Raft group.
+ * <p>
+ * SCM learns a pipeline's leader from datanode pipeline reports, which ride
the heartbeat (10s here), and
+ * never unsets it, so {@link Pipeline#getLeaderNode()} can name a datanode
that has since stopped leading.
+ * The Ratis client aims its first request at that node. Ratis puts a dummy
watch request at the head of the
+ * ordered sliding window, so a first request that lands on a follower burns
the watch retry budget - only
+ * 10s in this test - and fails every request queued behind it with
AlreadyClosedException (HDDS-16398).
+ */
+ private ContainerWithPipeline allocateContainerWithElectedLeader() throws
Exception {
Review Comment:
Doing this manually -- waiting and getting a new leader during the testing
-- for a component that has its own leader redirection capability doesn't feel
right to me.
let's just use default(watch timeout: 30s, write timeout 70s)
```diff
- ratisClientConfig.setWriteRequestTimeout(Duration.ofSeconds(10));
- ratisClientConfig.setWatchRequestTimeout(Duration.ofSeconds(10));
```
--
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]