Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-13443

V5 protocol flags decoding broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 3.11.0, 4.0-alpha1, 4.0
    • None
    • None
    • Low

    Description

      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.

      Attachments

        Activity

          People

            snazy Robert Stupp
            snazy Robert Stupp
            Robert Stupp
            Stefania Alborghetti
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: