aweisberg commented on code in PR #7:
URL: https://github.com/apache/cassandra-accord/pull/7#discussion_r1016004738


##########
accord-core/src/main/java/accord/messages/PreAccept.java:
##########
@@ -209,28 +210,36 @@ public String toString()
         }
     }
 
-    static Deps calculateDeps(SafeCommandStore commandStore, TxnId txnId, Keys 
keys, Txn.Kind kindOfTxn, Timestamp executeAt)
-    {
-        try (Deps.OrderedBuilder builder = Deps.orderedBuilder(false))
-        {
-            return calculateDeps(commandStore, txnId, keys, kindOfTxn, 
executeAt, builder);
-        }
-    }
-
     static PartialDeps calculatePartialDeps(SafeCommandStore commandStore, 
TxnId txnId, Keys keys, Txn.Kind kindOfTxn, Timestamp executeAt, KeyRanges 
ranges)
     {
         try (PartialDeps.OrderedBuilder builder = 
PartialDeps.orderedBuilder(ranges, false))
         {
-            return calculateDeps(commandStore, txnId, keys, kindOfTxn, 
executeAt, builder);
+            return calculateDeps(commandStore, txnId, keys, kindOfTxn, 
executeAt, ranges, builder);
         }
     }
 
-    private static <T extends Deps> T calculateDeps(SafeCommandStore 
commandStore, TxnId txnId, Keys keys, Txn.Kind kindOfTxn, Timestamp executeAt, 
Deps.AbstractOrderedBuilder<T> builder)
+    private static <T extends Deps> T calculateDeps(SafeCommandStore 
commandStore, TxnId txnId, Keys keys, Txn.Kind kindOfTxn, Timestamp executeAt, 
KeyRanges ranges, Deps.AbstractOrderedBuilder<T> builder)
     {
-        keys.forEach(key -> {
+//        keys.forEach((key) -> {
+//            CommandsForKey forKey = commandStore.maybeCommandsForKey(key);
+//            if (forKey == null)
+//                return;
+//
+//            builder.nextKey(key);
+//            TestKind testKind = kindOfTxn.isWrite() ? RorWs : Ws;
+//            forKey.uncommitted().before(executeAt, testKind, ANY_DEPS, null, 
ANY_STATUS, null)
+//                    .forEach(info -> {
+//                        if (!info.txnId.equals(txnId)) 
builder.add(info.txnId);
+//                    });
+//            forKey.committedByExecuteAt().before(executeAt, testKind, 
ANY_DEPS, null, ANY_STATUS, null)
+//                    .forEach(id -> {
+//                        if (!id.equals(txnId)) builder.add(id);
+//                    });

Review Comment:
   Remove commented out code?



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