belliottsmith commented on code in PR #45:
URL: https://github.com/apache/cassandra-accord/pull/45#discussion_r1185537236
##########
accord-core/src/main/java/accord/impl/InMemoryCommandStore.java:
##########
@@ -291,18 +333,49 @@ private void forEach(Routable keyOrRange, Ranges slice,
Consumer<RoutableKey> fo
}
}
+ @Override
+ protected void registerHistoricalTransactions(Deps deps)
+ {
+ Ranges allRanges = rangesForEpochHolder.get().all();
+ deps.keyDeps.keys().forEach(allRanges, key -> {
+ SafeCommandsForKey cfk = commandsForKey(key).createSafeReference();
+ deps.keyDeps.forEach(key, txnId -> {
+ // TODO (desired, efficiency): this can be made more efficient
by batching by epoch
+ if
(rangesForEpochHolder.get().coordinates(txnId).contains(key))
+ return; // already coordinates, no need to replicate
+ if
(!rangesForEpochHolder.get().allBefore(txnId.epoch()).contains(key))
+ return;
+
+ cfk.registerNotWitnessed(txnId);
Review Comment:
we might not have witnessed it?
--
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]