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

nodetool toppartitions can fail because ByteBuffer.array() returns more bytes than would be considered valid by UTF8Serializer.validate

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 3.0.29
    • Tool/nodetool
    • None

    Description

      The error below is caused by the use of ByteBuffer.array(). Doing so not only makes the hex key potentially incorrect but causes invalid data to be passed to AbstractType.getString and ultimately UTF8Validator.validate.

      error: String didn't validate.
      -- StackTrace --
      org.apache.cassandra.serializers.MarshalException: String didn't validate.
      	at org.apache.cassandra.serializers.UTF8Serializer.validate(UTF8Serializer.java:35)
      	at org.apache.cassandra.db.marshal.AbstractType.getString(AbstractType.java:129)
      	at org.apache.cassandra.db.ColumnFamilyStore.finishLocalSampling(ColumnFamilyStore.java:1633)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      

      Attachments

        Activity

          People

            jwest Jordan West
            jwest Jordan West
            Jordan West
            Brandon Williams, Cheng Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: