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

ReadResponseSerializer.serializedSize() calculation is wrong

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 0.8.8, 1.0.1
    • None
    • None
    • Normal

    Description

      in ReadResponse.java

      the following code

      public long serializedSize(ReadResponse response, int version)

      { int size = DBConstants.intSize; size += (response.isDigestQuery() ? response.digest() : ByteBufferUtil.EMPTY_BYTE_BUFFER).remaining(); size += DBConstants.boolSize; if (response.isDigestQuery()) size += response.digest().remaining(); else size += Row.serializer().serializedSize(response.row(), version); return size; }

      adds the digest size 2 times

      this triggers assertion error in at least ReadVerbHandler

      Attachments

        1. 3390.patch
          1 kB
          Yang Yang
        2. 3390.txt
          3 kB
          Jonathan Ellis

        Activity

          People

            jbellis Jonathan Ellis
            yangyangyyy Yang Yang
            Jonathan Ellis
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: