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

InvalidRequestException when validating column data includes entire column value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 0.8.5
    • None
    • None
    • Low

    Description

      If the column value fails to validate, then ThriftValidation.validateColumnData() calls bytesToHex() on the entire column value and puts this string in the Exception. Since the value may be up to 2GB, this is potentially a lot of extra memory. The value is likely to be logged (and presumably returned to the thrift client over the network?). This could cause a lot of slowdown or an unnecessary OOM crash, and is unlikely to be useful (the client has access to the full value anyway if required for debugging).

      Also, the reason for the exception (extracted from the MarshalException) is printed after the data, so if there's any truncation in the logging system at any point, the reason will be lost.

      The reason should be displayed before the column value, and the column value should be truncated in the Exception message.

      Attachments

        1. cassandra-2849.diff
          3 kB
          David Allsopp
        2. 2849-v2.txt
          5 kB
          Jonathan Ellis

        Activity

          People

            dallsopp David Allsopp
            dallsopp David Allsopp
            David Allsopp
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: