cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-8057) Record the real messaging version in all cases in OutboundTcpConnection
Date Sat, 04 Oct 2014 14:39:33 GMT
Aleksey Yeschenko created CASSANDRA-8057:

             Summary: Record the real messaging version in all cases in OutboundTcpConnection
                 Key: CASSANDRA-8057
             Project: Cassandra
          Issue Type: Bug
            Reporter: Aleksey Yeschenko
            Assignee: Aleksey Yeschenko
            Priority: Minor
             Fix For: 2.0.11

Piotr's quote, from CASSANDRA-6700 description:

bq. 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,

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;
        return Math.min(v, MessagingService.current_version);

But we need the true version for schema exchange decisions.

This message was sent by Atlassian JIRA

View raw message