belliottsmith commented on code in PR #224:
URL: https://github.com/apache/cassandra-accord/pull/224#discussion_r2210959485


##########
accord-core/src/main/java/accord/local/MaxDecidedRX.java:
##########
@@ -37,9 +47,64 @@ private MaxDecidedRX(boolean inclusiveEnds, Object[] tree)
         super(inclusiveEnds, tree);
     }
 
-    TxnId get(Routables<?> keysOrRanges)
+    TxnId min(Routables<?> keysOrRanges)
+    {
+        return noneIfNull(foldlWithDefault(keysOrRanges, TxnId::nonNullOrMin, 
null, TxnId.NONE));
+    }
+
+    TxnId max(Routables<?> keysOrRanges)
+    {
+        return maxIfNull(foldlWithDefault(keysOrRanges, TxnId::nonNullOrMax, 
null, TxnId.MAX));
+    }
+
+    TxnId min(Range range)
+    {
+        return noneIfNull(foldlWithDefault(range, TxnId::nonNullOrMin, null, 
TxnId.NONE));
+    }
+
+    TxnId max(Range range)
+    {
+        return maxIfNull(foldlWithDefault(range, TxnId::nonNullOrMax, null, 
TxnId.MAX));
+    }
+
+    public @Nullable TxnId minDecidedDependencyId(Unseekables<?> keysOrRanges, 
TxnId txnId)
+    {
+        Invariants.require(txnId.is(Txn.Kind.ExclusiveSyncPoint));
+        // first check max, as if this is later we don't know that we can 
safely filter
+        TxnId maxDecidedId = max(keysOrRanges);
+        if (maxDecidedId.compareTo(txnId) < 0)
+            return min(keysOrRanges);
+        return null;
+    }
+
+    public @Nullable TxnId minDecidedDependencyId(Unseekable keyOrRange, TxnId 
txnId)

Review Comment:
   It was used in a later patch that this got back ported from. I’ll remove it 
now.



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to