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 2020/09/09 02:07:24 UTC

[cassandra] branch trunk updated (7f258f1 -> 1b39ff6)

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

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


    from 7f258f1  When compaction gets interrupted, the exception should include the compactionId
     new bd1b84d  in-jvm dtests should validate Instance#serializeMessage serializeSize matches bytes written
     new 305e1e8  Merge branch 'cassandra-3.0' into cassandra-3.11
     new 1b39ff6  Merge branch 'cassandra-3.11' into trunk

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/cassandra/distributed/impl/Instance.java           | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)


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


[cassandra] 01/01: Merge branch 'cassandra-3.11' into trunk

Posted by dc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1b39ff61265570136e2fe820470d675b056940df
Merge: 7f258f1 305e1e8
Author: David Capwell <dc...@apache.org>
AuthorDate: Tue Sep 8 19:06:01 2020 -0700

    Merge branch 'cassandra-3.11' into trunk

 .../org/apache/cassandra/distributed/impl/Instance.java           | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --cc test/distributed/org/apache/cassandra/distributed/impl/Instance.java
index 2941668,b210b1d..5395cb8
--- a/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
+++ b/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
@@@ -20,8 -20,11 +20,9 @@@ package org.apache.cassandra.distribute
  
  import java.io.File;
  import java.io.IOException;
 -import java.net.InetAddress;
  import java.net.InetSocketAddress;
 -import java.nio.ByteBuffer;
  import java.util.ArrayList;
+ import java.util.Arrays;
  import java.util.Collections;
  import java.util.HashMap;
  import java.util.List;
@@@ -259,9 -303,21 +260,14 @@@ public class Instance extends IsolatedE
      {
          try (DataOutputBuffer out = new DataOutputBuffer(1024))
          {
 -            int version = MessagingService.instance().getVersion(to.getAddress());
 -
 -            out.writeInt(MessagingService.PROTOCOL_MAGIC);
 -            out.writeInt(id);
 -            long timestamp = System.currentTimeMillis();
 -            out.writeInt((int) timestamp);
 -
 -            MessageOut.serialize(out,
 -                                 from.getAddress(),
 -                                 messageIn.verb,
 -                                 messageIn.parameters,
 -                                 messageIn.payload,
 -                                 version);
 -
 -            return new MessageImpl(messageIn.verb.ordinal(), out.toByteArray(), id, version, from);
 +            int version = MessagingService.instance().versions.get(to);
 +            Message.serializer.serialize(messageOut, out, version);
-             return new MessageImpl(messageOut.verb().id, out.toByteArray(), messageOut.id(), version, fromCassandraInetAddressAndPort(from));
++            byte[] bytes = out.toByteArray();
++            if (messageOut.serializedSize(version) != bytes.length)
++                throw new AssertionError(String.format("Message serializedSize(%s) does not match what was written with serialize(out, %s) for verb %s and serializer %s; " +
++                                                       "expected %s, actual %s", version, version, messageOut.verb(), messageOut.serializer.getClass(),
++                                                       messageOut.serializedSize(version), bytes.length));
++            return new MessageImpl(messageOut.verb().id, bytes, messageOut.id(), version, fromCassandraInetAddressAndPort(from));
          }
          catch (IOException e)
          {


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