ivandika3 commented on code in PR #1311:
URL: https://github.com/apache/ratis/pull/1311#discussion_r2652293229
##########
ratis-server/src/main/java/org/apache/ratis/server/impl/ReadRequests.java:
##########
@@ -29,25 +29,36 @@
import java.util.NavigableMap;
import java.util.TreeMap;
import java.util.concurrent.CompletableFuture;
-import java.util.function.Consumer;
+import java.util.function.LongConsumer;
/** For supporting linearizable read. */
class ReadRequests {
private static final Logger LOG =
LoggerFactory.getLogger(ReadRequests.class);
static class ReadIndexQueue {
private final TimeoutExecutor scheduler = TimeoutExecutor.getInstance();
+ /** The log index known to be applied. */
+ private long lastAppliedIndex;
Review Comment:
Previously, we checked the applied index every time, but this seems to be
initialized once and never changed afterwards. Is this expected?
Should we use `LongSupplier` instead?
--
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]