You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by dc...@apache.org on 2022/05/25 21:10:45 UTC

[cassandra] branch cassandra-3.0 updated: jvm-dtest upgrade failures due to 3.x Ping not allowing serialize

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

dcapwell pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
     new fb8bf30c6d jvm-dtest upgrade failures due to 3.x Ping not allowing serialize
fb8bf30c6d is described below

commit fb8bf30c6d1b6f893a77a74b9e8b4223e5497dd4
Author: David Capwell <dc...@apache.org>
AuthorDate: Wed May 25 11:39:41 2022 -0700

    jvm-dtest upgrade failures due to 3.x Ping not allowing serialize
    
    patch by David Capwell; reviewed by Jon Meredith for CASSANDRA-17660
---
 src/java/org/apache/cassandra/net/PingMessage.java | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/java/org/apache/cassandra/net/PingMessage.java b/src/java/org/apache/cassandra/net/PingMessage.java
index 8eaf23ed93..d3a4322a30 100644
--- a/src/java/org/apache/cassandra/net/PingMessage.java
+++ b/src/java/org/apache/cassandra/net/PingMessage.java
@@ -38,20 +38,28 @@ public class PingMessage
 {
     public static IVersionedSerializer<PingMessage> serializer = new PingMessageSerializer();
 
+    private final int connectionType;
+
+    public PingMessage(int connectionType)
+    {
+        this.connectionType = connectionType;
+    }
+
     public static class PingMessageSerializer implements IVersionedSerializer<PingMessage>
     {
-        public void serialize(PingMessage t, DataOutputPlus out, int version)
+        @Override
+        public void serialize(PingMessage t, DataOutputPlus out, int version) throws IOException
         {
-            throw new UnsupportedOperationException();
+            out.writeByte(t.connectionType);
         }
 
+        @Override
         public PingMessage deserialize(DataInputPlus in, int version) throws IOException
         {
-            // throw away the one byte of the payload
-            in.readByte();
-            return new PingMessage();
+            return new PingMessage(in.readByte());
         }
 
+        @Override
         public long serializedSize(PingMessage t, int version)
         {
             return 1;


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