Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 65203200BBF for ; Mon, 31 Oct 2016 04:44:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 63105160AF8; Mon, 31 Oct 2016 03:44:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AB3BA160AF1 for ; Mon, 31 Oct 2016 04:44:04 +0100 (CET) Received: (qmail 25308 invoked by uid 500); 31 Oct 2016 03:43:58 -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 25290 invoked by uid 99); 31 Oct 2016 03:43:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Oct 2016 03:43:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5B66E2C1F56 for ; Mon, 31 Oct 2016 03:43:58 +0000 (UTC) Date: Mon, 31 Oct 2016 03:43:58 +0000 (UTC) From: "Stefania (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-12838) Extend native protocol flags and add supported versions to the SUPPORTED response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 31 Oct 2016 03:44:05 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-12838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15621119#comment-15621119 ] Stefania commented on CASSANDRA-12838: -------------------------------------- Thank you, I'll ping you on Monday morning to arrange a time. > Extend native protocol flags and add supported versions to the SUPPORTED response > --------------------------------------------------------------------------------- > > Key: CASSANDRA-12838 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12838 > Project: Cassandra > Issue Type: Sub-task > Components: CQL > Reporter: Stefania > Assignee: Stefania > Labels: client-impacting > Fix For: 3.x > > > We already use 7 bits for the flags of the QUERY message, and since they are encoded with a fixed size byte, we may be forced to change the structure of the message soon, and I'd like to do this in version 5 but without wasting bytes on the wire. Therefore, I propose to convert fixed flag's bytes to unsigned vints, as defined in CASSANDRA-9499. The only exception would be the flags in the frame, which should stay as fixed size. > Up to 7 bits, vints are encoded the same as bytes are, so no immediate change would be required in the drivers, although they should plan to support vint flags if supporting version 5. Moving forward, when a new flag is required for the QUERY message, and eventually when other flags reach 8 bits in other messages too, the flag's bitmaps would be automatically encoded with a size that is big enough to accommodate all flags, but no bigger than required. We can currently support up to 8 bytes with unsigned vints. > The downside is that drivers need to implement unsigned vint encoding for version 5, but this is already required by CASSANDRA-11873, and will most likely be required by CASSANDRA-11622 as well. > I would also like to add the list of versions to the SUPPORTED message, in order to simplify the handshake for drivers that prefer to send an OPTION message, rather than rely on receiving an error for an unsupported version in the STARTUP message. Said error should also contain the full list of supported versions, not just the min and max, for clarity, and because the latest version is now a beta version. > Finally, we currently store versions as integer constants in {{Server.java}}, and we still have a fair bit of hard-coded numbers in the code, especially in tests. I plan to clean this up by introducing a {{ProtocolVersion}} enum. -- This message was sent by Atlassian JIRA (v6.3.4#6332)