dcapwell commented on code in PR #3634:
URL: https://github.com/apache/cassandra/pull/3634#discussion_r1817100741
##########
test/unit/org/apache/cassandra/service/accord/SimulatedAccordCommandStoreTestBase.java:
##########
@@ -380,4 +396,81 @@ protected static Gen<Pair<Txn, FullRoute<?>>>
randomTxn(Gen<Routable.Domain> dom
}
};
}
+
+ public static class DepsModel
+ {
+ private final Map<RoutingKey, List<TxnId>> keyConflicts = new
HashMap<>();
+ private final RangeTree<RoutingKey, Range, TxnId> rangeConflicts =
RTree.create(RangeTreeRangeAccessor.instance);
+ private final Ranges storeRanges;
+
+ public DepsModel(Ranges storeRanges)
+ {
+ this.storeRanges = storeRanges;
+ }
+
+ public Map<RoutingKey, List<TxnId>> keyConflicts(Seekables<?, ?>
keysOrRanges)
+ {
+ keysOrRanges = keysOrRanges.slice(storeRanges,
Routables.Slice.Minimal);
Review Comment:
the store is the full range, but it has 2 ranges `(-Inf, ?], (?, +Inf]`, so
this slice just makes sure to include the ranges we will see rather than
requested
--
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]