cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Stupp (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-13443) V5 protocol flags decoding broken
Date Thu, 13 Apr 2017 07:06:41 GMT
Robert Stupp created CASSANDRA-13443:

             Summary: V5 protocol flags decoding broken
                 Key: CASSANDRA-13443
             Project: Cassandra
          Issue Type: Bug
            Reporter: Robert Stupp
            Assignee: Robert Stupp
            Priority: Minor

Since native protocol version 5 we deserialize the flags in {{org.apache.cassandra.cql3.QueryOptions.Codec#decode}}
as follows:
            EnumSet<Flag> flags = Flag.deserialize(version.isGreaterOrEqualTo(ProtocolVersion.V5)
                                                   ? (int)body.readUnsignedInt()
                                                   : (int)body.readByte());

This works until the highest bit (0x80) is not used. {{readByte}} must be changed to {{readUnsignedByte}}.

This message was sent by Atlassian JIRA

View raw message