dcapwell commented on code in PR #65:
URL: https://github.com/apache/cassandra-accord/pull/65#discussion_r1408533166
##########
accord-core/src/main/java/accord/coordinate/CoordinatePreAccept.java:
##########
@@ -250,6 +250,16 @@ void onNewEpoch(Topologies prevTopologies, Timestamp
executeAt, List<PreAcceptOk
// TODO (desired, efficiency): check if we have already have a valid
quorum for the future epoch
// (noting that nodes may have adopted new ranges, in which case they
should be discounted, and quorums may have changed shape)
node.withEpoch(executeAt.epoch(), () -> {
+ TopologyMismatch mismatch =
TopologyMismatch.checkForMismatch(node.topology().globalForEpoch(executeAt.epoch()),
txnId, route.homeKey(), txn.keys());
+ if (mismatch != null)
+ {
+ Invalidate.invalidate(node, txnId, route, (outcome, failure)
-> {
Review Comment:
I back ported my test from the drop keyspace branch and in a debugger I see
`accord.coordinate.Invalidate#Invalidate`
```
Topologies topologies = node.topology().forEpoch(invalidateWith,
txnId.epoch());
txnId = {TxnId@3550} "[1,5,2(KW),1]"
invalidateWith = {FullKeyRoute@3548}
"{homeKey:1#51196,[1#26558,1#51196,1#54417]}"
this.invalidateWith = {FullKeyRoute@3548}
"{homeKey:1#51196,[1#26558,1#51196,1#54417]}"
```
this uses topology `[Topology{epoch=1,
[Shard[1#21843,1#29124]:(-1655615791f, -1170363843f, -942051380f),
Shard[1#50967,1#58248]:(1f, 1298436801f, 1702745641f)]}]`
so, rather than using the new epoch which doesn't include the range, we use
the range from the txn_id.epoch (which is still valid)
--
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]