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

schema_* CFs do not respect column comparator which leads to CLI commands failure.

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 1.1.0
    • Legacy/Tools
    • None
    • Normal

    Description

      ColumnDefinition.

      {ascii, utf8, bool, ...}

      static methods used to initialize schema_* CFs column_metadata do not respect CF comparator and use ByteBufferUtil.bytes(...) for column names which creates problems in CLI and probably in other places.

      The CompositeType validator throws exception on first column

      String columnName = columnNameValidator.getString(columnDef.name);

      Because it appears the composite type length header is wrong (25455)

      AbstractCompositeType.getWithShortLength

      java.lang.IllegalArgumentException
      at java.nio.Buffer.limit(Buffer.java:247)
      at org.apache.cassandra.db.marshal.AbstractCompositeType.getBytes(AbstractCompositeType.java:50)
      at org.apache.cassandra.db.marshal.AbstractCompositeType.getWithShortLength(AbstractCompositeType.java:59)
      at org.apache.cassandra.db.marshal.AbstractCompositeType.getString(AbstractCompositeType.java:139)
      at org.apache.cassandra.cli.CliClient.describeColumnFamily(CliClient.java:2046)
      at org.apache.cassandra.cli.CliClient.describeKeySpace(CliClient.java:1969)
      at org.apache.cassandra.cli.CliClient.executeShowKeySpaces(CliClient.java:1574)

      (seen in trunk)

      Attachments

        1. CASSANDRA-4093-CD-changes.patch
          11 kB
          Pavel Yaskevich
        2. 4093.txt
          53 kB
          Sylvain Lebresne
        3. 4093_v2.txt
          38 kB
          Sylvain Lebresne

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            slebresne Sylvain Lebresne Assign to me
            dbrosius@apache.org Dave Brosius
            Sylvain Lebresne
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment