Description
Piotr's quote, from CASSANDRA-6700 description:
IncomingTcpConnection#handleModernVersion sets version to min(my version, version of the peer). This messes up schema pull/push.
Seems like we've missed a similar, yet related, case in OutboundTcpConnection#connect():
if (targetVersion < maxTargetVersion && targetVersion < MessagingService.current_version) { logger.trace("Detected higher max version {} (using {}); will reconnect when queued messages are done", maxTargetVersion, targetVersion); MessagingService.instance().setVersion(poolReference.endPoint(), Math.min(MessagingService.current_version, maxTargetVersion)); softCloseSocket(); }
Should really set the true version (maxTargetVersion), since MessagingService#getVersion() will return the min for us, anyway:
public int getVersion(InetAddress endpoint) { Integer v = versions.get(endpoint); if (v == null) { // we don't know the version. assume current. we'll know soon enough if that was incorrect. logger.trace("Assuming current protocol version for {}", endpoint); return MessagingService.current_version; } else return Math.min(v, MessagingService.current_version); }
But we need the true version for schema exchange decisions.
Attachments
Attachments
Issue Links
- relates to
-
CASSANDRA-6700 Use real node messaging versions for schema exchange decisions
- Resolved
-
CASSANDRA-7734 Schema pushes (seemingly) randomly not happening
- Resolved