dcapwell commented on code in PR #3416:
URL: https://github.com/apache/cassandra/pull/3416#discussion_r1680106520
##########
src/java/org/apache/cassandra/service/accord/AccordSafeCommandStore.java:
##########
@@ -246,28 +247,27 @@ private <O> O mapReduceForRange(Routables<?>
keysOrRanges, Ranges slice, BiFunct
{
if (commandsForRanges == null)
return accumulate;
+ CommandsForRanges cfr = commandsForRanges.current().slice(slice);
Review Comment:
we do already. That section you showed is actually
```
Routables<?> sliced = keysOrRanges.slice(slice, Routables.Slice.Minimal);
for (Key key : commandsForKeys.keySet()) {
if (!sliced.contains(key)) continue;
```
we *could* slice the keys but this is a set, so we would first need to sort
them, wrap them, then sort them... the contains check is slightly less work?
--
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]