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

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

commit c2bca69734253bea01bab59285df2b3ab0e571cb
Merge: d629a58 aaef02e
Author: Brandon Williams <[email protected]>
AuthorDate: Fri Feb 21 09:11:45 2020 -0600

    Merge branch 'cassandra-3.11' into trunk

 CHANGES.txt                                        |  3 +
 src/java/org/apache/cassandra/gms/Gossiper.java    |  5 +-
 .../apache/cassandra/gms/ExpireEndpointTest.java   | 65 ++++++++++++++++++++++
 3 files changed, 71 insertions(+), 2 deletions(-)

diff --cc CHANGES.txt
index 7c3dd94,a8baa44..be627fa
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,56 -1,9 +1,59 @@@
 -3.11.7
 +4.0-alpha4
 + * Unset GREP_OPTIONS (CASSANDRA-14487)
 + * Added streaming documentation (CASSANDRA-15477)
 + * Update to Python driver 3.21 for cqlsh (CASSANDRA-14872)
 + * Added bulk loading documentation (CASSANDRA-15480)
 + * Updated overview documentation (CASSANDRA-15483)
 + * Added CDC and speculative retry documentation to DDL section 
(CASSANDRA-15492)
 + * Fix missing Keyspaces in cqlsh describe output (CASSANDRA-15576)
 + * Fix multi DC nodetool status output (CASSANDRA-15305)
 + * Added documentation covering new Netty based internode messaging 
(CASSANDRA-15478)
 + * Add documentation of hints (CASSANDRA-15491)
 + * updateCoordinatorWriteLatencyTableMetric can produce misleading metrics 
(CASSANDRA-15569)
 + * Added documentation for read repair and an example of full repair 
(CASSANDRA-15485)
 + * Make cqlsh and cqlshlib Python 2 & 3 compatible (CASSANDRA-10190)
 + * Added documentation for Full Query Logging (CASSANDRA-15475)
 + * Added documentation for backups (CASSANDRA-15479)
 + * Documentation gives the wrong instruction to activate remote jmx 
(CASSANDRA-15535)
 + * Improve the description of nodetool listsnapshots command (CASSANDRA-14587)
 + * allow embedded cassandra launched from a one-jar or uno-jar 
(CASSANDRA-15494)
 + * Update hppc library to version 0.8.1 (CASSANDRA-12995)
 + * Limit the dependencies used by UDFs/UDAs (CASSANDRA-14737)
 + * Make native_transport_max_concurrent_requests_in_bytes updatable 
(CASSANDRA-15519)
 + * Cleanup and improvements to IndexInfo/ColumnIndex (CASSANDRA-15469)
 + * Potential Overflow in DatabaseDescriptor Functions That Convert Between 
KB/MB & Bytes (CASSANDRA-15470)
+ Merged from 3.0:
 - * Run evictFromMembership in GossipStage (CASSANDRA-15592)
++* Run evictFromMembership in GossipStage (CASSANDRA-15592)
+ 
 -
 -3.11.6
 +4.0-alpha3
 + * Restore monotonic read consistency guarantees for blocking read repair 
(CASSANDRA-14740)
 + * Separate exceptions for CAS write timeout exceptions caused by contention 
and unkown result (CASSANDRA-15350)
 + * Fix in-jvm dtest java 11 compatibility (CASSANDRA-15463)
 + * Remove joda time dependency (CASSANDRA-15257)
 + * Exclude purgeable tombstones from repaired data tracking (CASSANDRA-15462)
 + * Exclude legacy counter shards from repaired data tracking (CASSANDRA-15461)
 + * Make it easier to add trace headers to messages (CASSANDRA-15499)
 + * Fix and optimise partial compressed sstable streaming (CASSANDRA-13938)
 + * Improve error when JVM 11 can't access required modules (CASSANDRA-15468)
 + * Better handling of file deletion failures by DiskFailurePolicy 
(CASSANDRA-15143)
 + * Prevent read repair mutations from increasing read timeout 
(CASSANDRA-15442)
 + * Document 4.0 system keyspace changes, bump generations (CASSANDRA-15454)
 + * Make it possible to disable STCS-in-L0 during runtime (CASSANDRA-15445)
 + * Removed obsolete OldNetworkTopologyStrategy (CASSANDRA-13990)
 + * Align record header of FQL and audit binary log (CASSANDRA-15076)
 + * Shuffle forwarding replica for messages to non-local DC (CASSANDRA-15318)
 + * Optimise native protocol ASCII string encoding (CASSANDRA-15410)
 + * Make sure all exceptions are propagated in DebuggableThreadPoolExecutor 
(CASSANDRA-15332)
 + * Make it possible to resize concurrent read / write thread pools at runtime 
(CASSANDRA-15277)
 + * Close channels on error (CASSANDRA-15407)
 + * Add documentation for Java 11 support in Cassandra (CASSANDRA-15428)
 + * Integrate SJK into nodetool (CASSANDRA-12197)
 + * Ensure that empty clusterings with kind==CLUSTERING are Clustering.EMPTY 
(CASSANDRA-15498)
 + * The flag 'cross_node_timeout' has been set as true by default. This change
 +   is done under the assumption that users have setup NTP on their clusters or
 +   otherwise synchronize their clocks, and that clocks are mostly in sync, 
since
 +   this is a requirement for general correctness of last write wins. 
(CASSANDRA-15216)
 +Merged from 3.11:
   * Fix bad UDT sstable metadata serialization headers written by C* 3.0 on 
upgrade and in sstablescrub (CASSANDRA-15035)
   * Fix nodetool compactionstats showing extra pending task for TWCS - patch 
implemented (CASSANDRA-15409)
   * Fix SELECT JSON formatting for the "duration" type (CASSANDRA-15075)
diff --cc test/unit/org/apache/cassandra/gms/ExpireEndpointTest.java
index 0000000,f6d9fa3..298549e
mode 000000,100644..100644
--- a/test/unit/org/apache/cassandra/gms/ExpireEndpointTest.java
+++ b/test/unit/org/apache/cassandra/gms/ExpireEndpointTest.java
@@@ -1,0 -1,65 +1,65 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one
+  * or more contributor license agreements.  See the NOTICE file
+  * distributed with this work for additional information
+  * regarding copyright ownership.  The ASF licenses this file
+  * to you under the Apache License, Version 2.0 (the
+  * "License"); you may not use this file except in compliance
+  * with the License.  You may obtain a copy of the License at
+  *
+  *     http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ 
+ package org.apache.cassandra.gms;
+ 
 -import java.net.InetAddress;
+ import java.net.UnknownHostException;
+ import java.util.UUID;
+ 
+ import org.junit.BeforeClass;
+ import org.junit.Test;
+ 
+ import org.apache.cassandra.config.DatabaseDescriptor;
++import org.apache.cassandra.locator.InetAddressAndPort;
+ import org.apache.cassandra.service.StorageService;
+ 
+ import static org.junit.Assert.assertFalse;
+ import static org.junit.Assert.assertNull;
+ import static org.junit.Assert.assertTrue;
+ 
+ public class ExpireEndpointTest
+ {
+     @BeforeClass
+     public static void setup()
+     {
+         DatabaseDescriptor.daemonInitialization();
+     }
+ 
+     @Test
+     public void testExpireEndpoint() throws UnknownHostException
+     {
 -        InetAddress hostAddress = InetAddress.getByName("127.0.0.2");
++        InetAddressAndPort hostAddress = 
InetAddressAndPort.getByName("127.0.0.2");
+         UUID hostId = UUID.randomUUID();
+         long expireTime = System.currentTimeMillis() - 1;
+ 
+         Gossiper.instance.initializeNodeUnsafe(hostAddress, hostId, 1);
+ 
+         EndpointState endpointState = 
Gossiper.instance.getEndpointStateForEndpoint(hostAddress);
+         Gossiper.runInGossipStageBlocking(() -> 
Gossiper.instance.markDead(hostAddress, endpointState));
 -        endpointState.addApplicationState(ApplicationState.STATUS, 
StorageService.instance.valueFactory.removedNonlocal(hostId, expireTime));
++        endpointState.addApplicationState(ApplicationState.STATUS_WITH_PORT, 
StorageService.instance.valueFactory.removedNonlocal(hostId, expireTime));
+         Gossiper.instance.addExpireTimeForEndpoint(hostAddress, expireTime);
+ 
+         assertTrue("Expiring endpoint not unreachable before status check", 
Gossiper.instance.getUnreachableMembers().contains(hostAddress));
+ 
+         Gossiper.instance.doStatusCheck();
+ 
+         assertFalse("Expired endpoint still part of live members", 
Gossiper.instance.getLiveMembers().contains(hostAddress));
+         assertFalse("Expired endpoint still part of unreachable members", 
Gossiper.instance.getUnreachableMembers().contains(hostAddress));
+         assertNull("Expired endpoint still contain endpoint state", 
Gossiper.instance.getEndpointStateForEndpoint(hostAddress));
+     }
+ }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to