ifesdjeen commented on code in PR #155:
URL: https://github.com/apache/cassandra-accord/pull/155#discussion_r1907438600
##########
accord-core/src/main/java/accord/messages/PreAccept.java:
##########
@@ -254,11 +255,11 @@ static Deps calculateDeps(SafeCommandStore safeStore,
TxnId txnId, StoreParticip
{
// TODO (expected): do not build covering ranges; no longer especially
valuable given use of FullRoute
// NOTE: ExclusiveSyncPoint *relies* on STARTED_BEFORE to ensure it
reports a dependency on *every* earlier TxnId that may execute (before or after
it).
-
+ Participants<?> intersecting =
participants.touches().intersecting(safeStore.context().keys());
Review Comment:
In short, the exception looked something like this:
```
java.lang.IllegalStateException: Attempted to access keysOrRanges outside of
what was asked for; asked for
[1b255f4d-ef25-40a6-0000-00000000000b:[(-8716086574827763138,-8669969714643489259]]],
accessed
[1b255f4d-ef25-40a6-0000-00000000000b:[(-8716086574827763138,-8669969714643489259],
(-8669969714643489259,-8577735994274941501]]]. Context:
PreAccept{txnId:[23,1733483580251001,9(RX),5], txn:{read:TxnKeyRead{}},
scope:[1b255f4d-ef25-40a6-0000-00000000000b:[(-8716086574827763138,-8669969714643489259]]]}
java.lang.IllegalStateException: Attempted to access keysOrRanges outside of
what was asked for; asked for
[1b255f4d-ef25-40a6-0000-00000000000b:[(-8669969714643489259,-8577735994274941501]]],
accessed
[1b255f4d-ef25-40a6-0000-00000000000b:[(-8716086574827763138,-8669969714643489259],
(-8669969714643489259,-8577735994274941501]]]. Context:
PreAccept{txnId:[23,1733483580251001,9(RX),5], txn:{read:TxnKeyRead{}},
scope:[1b255f4d-ef25-40a6-0000-00000000000b:[(-8669969714643489259,-8577735994274941501]]]}
```
We have two scopes that are _split_, but we map/reduce both of them:
(-8716086574827763138,-8669969714643489259],(-8669969714643489259,-8577735994274941501]
However in each case we only need to calculate deps for the intersection, it
looks like.
##########
accord-core/src/main/java/accord/messages/PreAccept.java:
##########
@@ -254,11 +255,11 @@ static Deps calculateDeps(SafeCommandStore safeStore,
TxnId txnId, StoreParticip
{
// TODO (expected): do not build covering ranges; no longer especially
valuable given use of FullRoute
// NOTE: ExclusiveSyncPoint *relies* on STARTED_BEFORE to ensure it
reports a dependency on *every* earlier TxnId that may execute (before or after
it).
-
+ Participants<?> intersecting =
participants.touches().intersecting(safeStore.context().keys());
Review Comment:
In short, the exception looked something like this:
```
java.lang.IllegalStateException: Attempted to access keysOrRanges outside of
what was asked for; asked for
[1b255f4d-ef25-40a6-0000-00000000000b:[(-8716086574827763138,-8669969714643489259]]],
accessed
[1b255f4d-ef25-40a6-0000-00000000000b:[(-8716086574827763138,-8669969714643489259],
(-8669969714643489259,-8577735994274941501]]]. Context:
PreAccept{txnId:[23,1733483580251001,9(RX),5], txn:{read:TxnKeyRead{}},
scope:[1b255f4d-ef25-40a6-0000-00000000000b:[(-8716086574827763138,-8669969714643489259]]]}
java.lang.IllegalStateException: Attempted to access keysOrRanges outside of
what was asked for; asked for
[1b255f4d-ef25-40a6-0000-00000000000b:[(-8669969714643489259,-8577735994274941501]]],
accessed
[1b255f4d-ef25-40a6-0000-00000000000b:[(-8716086574827763138,-8669969714643489259],
(-8669969714643489259,-8577735994274941501]]]. Context:
PreAccept{txnId:[23,1733483580251001,9(RX),5], txn:{read:TxnKeyRead{}},
scope:[1b255f4d-ef25-40a6-0000-00000000000b:[(-8669969714643489259,-8577735994274941501]]]}
```
We have two scopes that are _split_, but we map/reduce both of them:
```
(-8716086574827763138,-8669969714643489259],(-8669969714643489259,-8577735994274941501]
```
However in each case we only need to calculate deps for the intersection, it
looks like.
--
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]