belliottsmith commented on code in PR #150:
URL: https://github.com/apache/cassandra-accord/pull/150#discussion_r1885056952
##########
accord-core/src/main/java/accord/local/CommandStore.java:
##########
@@ -498,15 +499,21 @@ final Supplier<EpochReady> bootstrapper(Node node, Ranges
newRanges, long epoch)
protected Supplier<EpochReady> sync(Node node, Ranges ranges, long epoch)
{
return () -> {
- if (redundantBefore.min(ranges,
RedundantBefore.Entry::locallyWitnessedBefore).epoch() >= epoch)
- return new EpochReady(epoch, DONE, DONE, DONE, DONE);
-
- AsyncResults.SettableResult<Void> whenDone = new
AsyncResults.SettableResult<>();
- waitingOnSync.put(epoch, new WaitingOnSync(whenDone, ranges));
- return new EpochReady(epoch, DONE, whenDone, DONE, DONE);
+ AsyncResult<Void> readyToCoordinate = readyToCoordinate(ranges,
epoch);
+ return new EpochReady(epoch, DONE, readyToCoordinate, DONE, DONE);
Review Comment:
being able to serve reads and being able to coordinate are distinct
properties, one does not necessarily happen before the other. We only create
the async read result before we create the async coordination result.
--
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]