dcapwell commented on code in PR #106:
URL: https://github.com/apache/cassandra-accord/pull/106#discussion_r1700658902


##########
accord-core/src/main/java/accord/primitives/Deps.java:
##########
@@ -55,12 +79,23 @@ public static abstract class AbstractBuilder<T extends 
Deps> implements AutoClos
 
         public AbstractBuilder<T> add(Seekable keyOrRange, TxnId txnId)
         {
-            switch (keyOrRange.domain())
+            Invariants.checkArgument(keyOrRange.domain() == txnId.domain(), 
keyOrRange + " is not same domain as " + txnId);

Review Comment:
   I don't think this check is correct, and in my new testing I hit it.
   
   ```
   Caused by: java.lang.IllegalArgumentException: 94851792 is not same domain 
as [1,157613,1(RR),42]
        at accord.utils.Invariants.illegalArgument(Invariants.java:84)
        at accord.utils.Invariants.checkArgument(Invariants.java:221)
        at accord.primitives.Deps$AbstractBuilder.add(Deps.java:82)
        at 
accord.messages.PreAccept.lambda$calculatePartialDeps$0(PreAccept.java:257)
        at accord.local.CommandsForKey.mapReduceActive(CommandsForKey.java:1064)
        at 
accord.impl.InMemoryCommandStore$InMemorySafeStore.lambda$mapReduceActive$4(InMemoryCommandStore.java:854)
        at 
accord.impl.InMemoryCommandStore.mapReduceForKey(InMemoryCommandStore.java:288)
        at 
accord.impl.InMemoryCommandStore$InMemorySafeStore.mapReduceActive(InMemoryCommandStore.java:853)
        at accord.messages.PreAccept.calculatePartialDeps(PreAccept.java:254)
   ```
   
   a range read provided its `Ranges`.  And range transactions find both range 
and key transactions, only key txn have this specific property that the domain 
matches



-- 
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]

Reply via email to