belliottsmith commented on code in PR #7:
URL: https://github.com/apache/cassandra-accord/pull/7#discussion_r1014500823
##########
accord-core/src/main/java/accord/coordinate/tracking/ReadTracker.java:
##########
@@ -148,19 +228,26 @@ public Set<Id> computeMinimalReadSetAndMarkInflight()
while (!toRead.isEmpty())
{
if (candidates.isEmpty())
+ {
+ if (!nodes.isEmpty())
+ nodes.forEach(this::recordContacted);
return null;
+ }
// TODO: Topology needs concept of locality/distance
candidates.sort((a, b) -> compareIntersections(a, b, toRead));
int i = candidates.size() - 1;
Id node = candidates.get(i);
nodes.add(node);
- recordInflightRead(node);
candidates.remove(i);
forEachTrackerForNode(node, (tracker, ignore) ->
toRead.remove(tracker));
}
+ // must recordInFlightRead after loop, as we might return null if the
reads are insufficient to make progress
+ // but in this case we need the tracker to
Review Comment:
I’m addressing this in a follow up patchset refactoring trackers to resolve
some issues
--
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]