maedhroz commented on code in PR #3274:
URL: https://github.com/apache/cassandra/pull/3274#discussion_r1592741575
##########
src/java/org/apache/cassandra/service/reads/ReadCallback.java:
##########
@@ -96,12 +95,28 @@ protected P replicaPlan()
return replicaPlan.get();
}
- public boolean await(long timePastStart, TimeUnit unit)
+ public boolean await(long commandTimeout, TimeUnit unit)
+ {
+ return
awaitUntil(requestTime.computeDeadline(unit.toNanos(commandTimeout)));
+ }
+
+ /**
+ * In case of speculation, we want to time out the request immediately if
we have _also_ hit a deadline.
+ *
+ * For example, we have a read timeout of 10s, 99% latency of 5 seconds,
and time base is QUEUE:
+ * * Request has spent 3 seconds in the queue. Here, we will wait for 2
seconds and try to speculate
+ * * Request has spent 10 seconds in the queue. Here, we will wait for 0
seconds and try to speculate
+ *
+ * If the time base is REQUEST:
+ * * Request has spent 10 seconds in the queue. Here, we will only wait
2 seconds and then try to speculate
Review Comment:
Assuming a `native_transport_timeout` of 12s?
--
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]