This is an automated email from the ASF dual-hosted git repository.

marcuse pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 60fe2dc61d3ea3d241e7e624f7a3ef94bd427b2f
Author: Marcus Eriksson <marc...@apache.org>
AuthorDate: Wed Jan 31 12:52:16 2024 +0100

    Fix version check in InProgressSequences serialization
    
    Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-19348
---
 .../org/apache/cassandra/tcm/sequences/InProgressSequences.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/src/java/org/apache/cassandra/tcm/sequences/InProgressSequences.java 
b/src/java/org/apache/cassandra/tcm/sequences/InProgressSequences.java
index a8b2b16259..86b449c346 100644
--- a/src/java/org/apache/cassandra/tcm/sequences/InProgressSequences.java
+++ b/src/java/org/apache/cassandra/tcm/sequences/InProgressSequences.java
@@ -223,7 +223,7 @@ public class InProgressSequences implements 
MetadataValue<InProgressSequences>
             out.writeInt(t.state.size());
             for (Map.Entry<MultiStepOperation.SequenceKey, 
MultiStepOperation<?>> entry : t.state.entrySet())
             {
-                if (Version.UNKNOWN.isBefore(V2))
+                if (version.isBefore(V2))
                 {
                     NodeId.serializer.serialize((NodeId) entry.getKey(), out, 
version);
                     MultiStepOperation<?> seq = entry.getValue();
@@ -249,7 +249,7 @@ public class InProgressSequences implements 
MetadataValue<InProgressSequences>
             ImmutableMap.Builder<MultiStepOperation.SequenceKey, 
MultiStepOperation<?>> res = ImmutableMap.builder();
             for (int i = 0; i < ipsSize; i++)
             {
-                if (Version.UNKNOWN.isBefore(V2))
+                if (version.isBefore(V2))
                 {
                     NodeId nodeId = NodeId.serializer.deserialize(in, version);
                     MultiStepOperation.Kind kind = 
MultiStepOperation.Kind.valueOf(in.readUTF());
@@ -273,7 +273,7 @@ public class InProgressSequences implements 
MetadataValue<InProgressSequences>
             size += sizeof(t.state.size());
             for (Map.Entry<MultiStepOperation.SequenceKey, 
MultiStepOperation<?>> entry : t.state.entrySet())
             {
-                if (Version.UNKNOWN.isBefore(V2))
+                if (version.isBefore(V2))
                 {
                     size += NodeId.serializer.serializedSize((NodeId) 
entry.getKey(), version);
                     MultiStepOperation<?> seq = entry.getValue();


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

Reply via email to