[ 
https://issues.apache.org/jira/browse/CASSANDRA-17883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17603178#comment-17603178
 ] 

Jacek Lewandowski commented on CASSANDRA-17883:
-----------------------------------------------

We used this test to reproduce

{code:java}
try (Cluster cluster = init(Cluster.build(2).withConfig(cfg -> 
cfg.with(Feature.GOSSIP, Feature.NETWORK)).start()))
        {
            cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (pk INT 
PRIMARY KEY, v TEXT)");

            assertTrue(cluster.get(1).callOnInstance(() -> 
Schema.instance.getTableMetadata(KEYSPACE, "tbl") != null));
            assertTrue(cluster.get(2).callOnInstance(() -> 
Schema.instance.getTableMetadata(KEYSPACE, "tbl") != null));

            UUID hostId2 = cluster.get(2).callOnInstance(() -> 
Gossiper.instance.getHostId(FBUtilities.getBroadcastAddressAndPort()));

            cluster.get(2).shutdown().get();

            Awaitility.await()
                      .atMost(ofSeconds(30))
                      .until(() -> cluster
                                   .get(1)
                                   .callOnInstance(() -> Gossiper.instance
                                                         .getLiveMembers()
                                                         .stream()
                                                         .allMatch(addr -> 
addr.equals(FBUtilities.getBroadcastAddressAndPort()))));

            int result = cluster.get(1).nodetool("removenode", 
hostId2.toString());
            Assertions.assertThat(result).isZero();

            Awaitility.await()
                      .atMost(ofSeconds(30))
                      .until(() -> cluster.get(1).callOnInstance(() -> 
Gossiper.instance.getUnreachableMembers().isEmpty()));

            cluster.get(2).startup();

            Awaitility.await()
                      .atMost(ofSeconds(30))
                      .until(() -> cluster
                                   .get(1)
                                   .callOnInstance(() -> Gossiper.instance
                                                         .getLiveMembers()
                                                         .size() == 2));

            cluster.filters().verbs(Verb.SCHEMA_PUSH_REQ.id).drop();
            cluster.coordinator(2).execute("CREATE TABLE " + KEYSPACE + ".tbl2 
(pk INT PRIMARY KEY, v TEXT)", ConsistencyLevel.ONE);

            Thread.sleep(30000);

            cluster.filters().reset();

            Awaitility.waitAtMost(ofMinutes(3))
                      .pollDelay(ofSeconds(1))
                      .until(() -> cluster.get(1).callOnInstance(() -> 
Schema.instance.getTableMetadata(KEYSPACE, "tbl2") != null));
{code}


> Node will not get schema updates if it replaces a removed node with the same 
> address
> ------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17883
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17883
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Legacy/Distributed Metadata
>            Reporter: Jacek Lewandowski
>            Priority: Normal
>             Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>
> If a node is removed and then a node with the same address is added, it is 
> ignored by migration coordinator - that is, when that node fails to push the 
> schema change, the other nodes will not be able pull it later during periodic 
> update.
> Such situation will last until the other nodes gets restarted.
> This is caused by permanently adding the address of the node being removed to 
> the ignore list in migration coordinator.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to