This is an automated email from the ASF dual-hosted git repository.
benedict pushed a commit to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/cep-15-accord by this push:
new 4007ef43c6 Fix AbstractKeys.without (and CoordinateEphemeralRead
execution in future epoch)
4007ef43c6 is described below
commit 4007ef43c6534400c12537c673d1cd24e955d181
Author: Benedict Elliott Smith <[email protected]>
AuthorDate: Tue Nov 12 13:04:15 2024 +0000
Fix AbstractKeys.without (and CoordinateEphemeralRead execution in future
epoch)
patch by Benedict; reviewed by David Capwell for CASSANDRA-20095
---
modules/accord | 2 +-
.../cassandra/service/accord/AccordSafeCommandStore.java | 11 ++++++++---
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/modules/accord b/modules/accord
index a8f78552b9..ad6d9c7489 160000
--- a/modules/accord
+++ b/modules/accord
@@ -1 +1 @@
-Subproject commit a8f78552b958a9d9b6fc9f2840753001cd1f6004
+Subproject commit ad6d9c748984d64518377510434e59923b7c3183
diff --git
a/src/java/org/apache/cassandra/service/accord/AccordSafeCommandStore.java
b/src/java/org/apache/cassandra/service/accord/AccordSafeCommandStore.java
index e28956cdc0..86ff0f847a 100644
--- a/src/java/org/apache/cassandra/service/accord/AccordSafeCommandStore.java
+++ b/src/java/org/apache/cassandra/service/accord/AccordSafeCommandStore.java
@@ -18,8 +18,10 @@
package org.apache.cassandra.service.accord;
+import java.util.AbstractCollection;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.NavigableMap;
@@ -46,6 +48,8 @@ import accord.local.SafeCommandStore;
import accord.local.cfk.CommandsForKey;
import accord.primitives.AbstractKeys;
import accord.primitives.AbstractRanges;
+import accord.primitives.AbstractUnseekableKeys;
+import accord.primitives.Participants;
import accord.primitives.Ranges;
import accord.primitives.Routable;
import accord.primitives.Routables;
@@ -119,13 +123,13 @@ public class AccordSafeCommandStore extends
SafeCommandStore
return context;
List<RoutingKey> unavailable = null;
- Unseekables<?> keys = context.keys();
+ AbstractUnseekableKeys keys = (AbstractUnseekableKeys)
context.keys();
if (keys.size() == 0)
return context;
for (int i = 0 ; i < keys.size() ; ++i)
{
- RoutingKey key = (RoutingKey) keys.get(i);
+ RoutingKey key = keys.get(i);
if (keyHistory == TIMESTAMPS)
{
if (null != timestampsForKeyInternal(key))
@@ -161,7 +165,8 @@ public class AccordSafeCommandStore extends SafeCommandStore
if (unavailable.size() == keys.size())
return null;
- return PreLoadContext.contextFor(context.primaryTxnId(),
context.additionalTxnId(),
keys.without(RoutingKeys.ofSortedUnique(unavailable)), keyHistory);
+ Participants<RoutingKey> available =
keys.without(RoutingKeys.ofSortedUnique(unavailable));
+ return PreLoadContext.contextFor(context.primaryTxnId(),
context.additionalTxnId(), available, keyHistory);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]