[CEP-21] Add log message for backwards compatibility

Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for CASSANDRA-19068
This commit is contained in:
Sam Tunnicliffe 2023-11-28 15:48:23 +00:00
parent de1766a2f8
commit 30ed828c87
1 changed files with 6 additions and 0 deletions

View File

@ -112,6 +112,7 @@ public class LegacyStateListener implements ChangeListener.Async
Gossiper.instance.addLocalApplicationState(SCHEMA, StorageService.instance.valueFactory.schema(next.schema.getVersion()));
}
if (next.directory.peerState(change) == LEFT)
{
Gossiper.instance.mergeNodeToGossip(change, next, prev.tokenMap.tokens(change));
@ -122,6 +123,11 @@ public class LegacyStateListener implements ChangeListener.Async
GossipHelper.removeFromGossip(endpoint);
}
}
else if(next.directory.peerState(change) == MOVING)
{
// legacy log messages for tests
logger.debug("Node {} state MOVING, tokens {}", next.directory.endpoint(change), prev.tokenMap.tokens(change));
}
else if (NodeState.isBootstrap(next.directory.peerState(change)))
{
// For compatibility with clients, ensure we set TOKENS for bootstrapping nodes in gossip.