adelapena commented on code in PR #1850:
URL: https://github.com/apache/cassandra/pull/1850#discussion_r969505936
##########
src/java/org/apache/cassandra/schema/MigrationCoordinator.java:
##########
@@ -397,16 +476,52 @@ private synchronized void
removeEndpointFromVersion(InetAddressAndPort endpoint,
return;
info.endpoints.remove(endpoint);
+ logger.trace("Removed endpoint {} from schema {}: {}", endpoint,
version, info);
if (info.endpoints.isEmpty())
{
info.waitQueue.signalAll();
versionInfo.remove(version);
+ logger.trace("Removed schema info: {}", info);
+ }
+ }
+
+ private void clearVersionsInfo()
+ {
+ Iterator<Map.Entry<UUID, VersionInfo>> it =
versionInfo.entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry<UUID, VersionInfo> entry = it.next();
+ it.remove();
+ entry.getValue().waitQueue.signal();
+ }
+ }
+
+ private void reportCurrentSchemaVersionOnEndpoint(InetAddressAndPort
endpoint)
+ {
+ if (FBUtilities.getBroadcastAddressAndPort().equals(endpoint))
+ {
+ // reportEndpointVersion(endpoint, schemaVersion.get());
+ }
+ else
+ {
+ EndpointState state =
Gossiper.instance.getEndpointStateForEndpoint(endpoint);
+ if (state != null)
+ {
+ UUID v = state.getSchemaVersion();
+ if (v != null)
+ {
+ reportEndpointVersion(endpoint, v);
+ }
+ }
}
}
public synchronized void removeAndIgnoreEndpoint(InetAddressAndPort
endpoint)
{
+ logger.debug("Removing and ignoring endpoint {}", endpoint);
Preconditions.checkArgument(endpoint != null);
+ // TODO The endpoint address is now ignored but when a node with the
same address is added again later,
+ // there will be no way to include it in schema synchronization other
than restarting each other node
Review Comment:
It the TODO gone in the last commit? I think it makes sense to keep it,
probably referencing
[CASSANDRA-17883](https://issues.apache.org/jira/browse/CASSANDRA-17883)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]