mikemccand commented on code in PR #11822:
URL: https://github.com/apache/lucene/pull/11822#discussion_r983427086
##########
lucene/replicator/src/java/org/apache/lucene/replicator/nrt/PrimaryNode.java:
##########
@@ -196,6 +197,21 @@ public synchronized long getLastCommitVersion() {
throw new AssertionError("missing VERSION_KEY");
}
+ /**
+ * @return the number of milliseconds to wait during shutdown for remote
replicas to close
+ */
+ public int getRemoteCloseTimeout() {
+ return remoteCloseTimeout;
+ }
+
+ /**
+ * Set the number of milliseconds to wait during shutdown for remote
replicas to close. {@code -1}
+ * (the default) means forever, and {@code 0} means don't wait at all.
+ */
+ public void setRemoteCloseTimeout(int remoteCloseTimeout) {
+ this.remoteCloseTimeout = remoteCloseTimeout;
Review Comment:
Could we throw `IllegalArgumentException` if this is < -1?
##########
lucene/replicator/src/java/org/apache/lucene/replicator/nrt/PrimaryNode.java:
##########
@@ -196,6 +197,21 @@ public synchronized long getLastCommitVersion() {
throw new AssertionError("missing VERSION_KEY");
}
+ /**
+ * @return the number of milliseconds to wait during shutdown for remote
replicas to close
+ */
+ public int getRemoteCloseTimeout() {
+ return remoteCloseTimeout;
+ }
+
+ /**
+ * Set the number of milliseconds to wait during shutdown for remote
replicas to close. {@code -1}
+ * (the default) means forever, and {@code 0} means don't wait at all.
+ */
+ public void setRemoteCloseTimeout(int remoteCloseTimeout) {
Review Comment:
In addition to a specific test case, we could also randomize the timeout we
pass in our randomized tests. Randomly sometimes pass 0, other times a random
range or so.
--
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]