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 01d8cbdd1ec0f662173064dd65d0abcdc45e209d
Merge: 64ae866095 806a395b9c
Author: Marcus Eriksson <marc...@apache.org>
AuthorDate: Thu Nov 30 08:32:46 2023 +0100

    Merge branch 'cassandra-5.0' into trunk

 CHANGES.txt                                     | 1 +
 src/java/org/apache/cassandra/gms/Gossiper.java | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --cc CHANGES.txt
index 08ee99b2a7,d305e2f65e..ecc330bf8b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,10 -1,5 +1,11 @@@
 -5.0-beta1
 +5.1
 + * Upgrade jackson to 2.15.3 and snakeyaml to 2.1 (CASSANDRA-18875)
 + * Transactional Cluster Metadata [CEP-21] (CASSANDRA-18330)
 + * Add ELAPSED command to cqlsh (CASSANDRA-18861)
 + * Add the ability to disable bulk loading of SSTables (CASSANDRA-18781)
 + * Clean up obsolete functions and simplify cql_version handling in cqlsh 
(CASSANDRA-18787)
 +Merged from 5.0:
+  * Clone EndpointState before sending GossipShutdown message (CASSANDRA-19115)
   * SAI indexes are marked queryable during truncation (CASSANDRA-19032)
   * Enable Direct-IO feature for CommitLog files using Java native API's. 
(CASSANDRA-18464)
   * SAI fixes for composite partitions, and static and non-static rows 
intersections (CASSANDRA-19034)
diff --cc src/java/org/apache/cassandra/gms/Gossiper.java
index 5ffa2d7bdb,b5b0caec77..7bdc9c2fe7
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@@ -1796,11 -2203,11 +1796,13 @@@ public class Gossiper implements IFailu
          if (mystate != null && !isSilentShutdownState(mystate) && 
StorageService.instance.isJoined())
          {
              logger.info("Announcing shutdown");
 +            shutdownAnnounced.set(true);
 +
              addLocalApplicationState(ApplicationState.STATUS_WITH_PORT, 
StorageService.instance.valueFactory.shutdown(true));
              addLocalApplicationState(ApplicationState.STATUS, 
StorageService.instance.valueFactory.shutdown(true));
-             Message<GossipShutdown> message = 
Message.out(Verb.GOSSIP_SHUTDOWN, new GossipShutdown(mystate));
+             // clone endpointstate to avoid it changing between 
serializedSize and serialize calls
+             EndpointState clone = new EndpointState(mystate);
+             Message<GossipShutdown> message = 
Message.out(Verb.GOSSIP_SHUTDOWN, new GossipShutdown(clone));
              for (InetAddressAndPort ep : liveEndpoints)
                  MessagingService.instance().send(message, ep);
              
Uninterruptibles.sleepUninterruptibly(SHUTDOWN_ANNOUNCE_DELAY_IN_MS.getInt(), 
TimeUnit.MILLISECONDS);


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

Reply via email to