cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piotr Kołaczkowski (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-8057) Record the real messaging version in all cases in OutboundTcpConnection
Date Tue, 07 Oct 2014 07:15:34 GMT

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

Piotr Kołaczkowski commented on CASSANDRA-8057:
-----------------------------------------------

+1

> Record the real messaging version in all cases in OutboundTcpConnection
> -----------------------------------------------------------------------
>
>                 Key: CASSANDRA-8057
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8057
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Aleksey Yeschenko
>            Assignee: Aleksey Yeschenko
>            Priority: Minor
>             Fix For: 2.0.11, 2.1.1
>
>         Attachments: 8057.txt
>
>
> 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():
> {code}
> 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();
> }
> {code}
> Should really set the true version (maxTargetVersion), since MessagingService#getVersion()
will return the min for us, anyway:
> {code}
> 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);
> }
> {code}
> But we need the true version for schema exchange decisions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message