Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B3E711771A for ; Tue, 7 Oct 2014 07:15:34 +0000 (UTC) Received: (qmail 80540 invoked by uid 500); 7 Oct 2014 07:15:34 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 80512 invoked by uid 500); 7 Oct 2014 07:15:34 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 80501 invoked by uid 99); 7 Oct 2014 07:15:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Oct 2014 07:15:34 +0000 Date: Tue, 7 Oct 2014 07:15:34 +0000 (UTC) From: =?utf-8?Q?Piotr_Ko=C5=82aczkowski_=28JIRA=29?= To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-8057) Record the real messaging version in all cases in OutboundTcpConnection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-8057?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D= 14161573#comment-14161573 ]=20 Piotr Ko=C5=82aczkowski 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 vers= ion, version of the peer). This messes up schema pull/push. > Seems like we've missed a similar, yet related, case in OutboundTcpConnec= tion#connect(): > {code} > if (targetVersion < maxTargetVersion && targetVersion < MessagingService.= current_version) > { > logger.trace("Detected higher max version {} (using {}); will reconne= ct 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 MessagingSer= vice#getVersion() will return the min for us, anyway: > {code} > public int getVersion(InetAddress endpoint) > { > Integer v =3D versions.get(endpoint); > if (v =3D=3D null) > { > // we don't know the version. assume current. we'll know soon eno= ugh 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)