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

Fix denseness and column metadata updates coming from Thrift

    XMLWordPrintableJSON

Details

    • Low

    Description

      It was decided that we'd be recalculating is_dense for table updates coming from Thrift on every change. However, due to some oversight, is_dense can only go from false to true. Once dense, even adding a REGULAR column will not reset is_dense back to false.

      The recalculation fails because no matter what happens, we never remove the auto-generated CLUSTERING and COMPACT_VALUE columns of a dense table.

      Which ultimately leads to the issue on 2.2 to 3.0 upgrade (see CASSANDRA-11315).

      What we should do is remove the special-case for Thrift in LegacySchemaTables::makeUpdateTableMutation and correct the logic in ThriftConversion::internalFromThrift to remove those columns when going from dense to sparse.

      This is not enough to fix CASSANDRA-11315, however, as we need to handle pre-patch upgrades, and upgrades from 2.1. Fixing it in 2.2 means a) getting proper schema from DESCRIBE now and b) using the more efficient SparseCellNameType when you add columns.

      Attachments

        Issue Links

          Activity

            People

              aleksey Aleksey Yeschenko
              aleksey Aleksey Yeschenko
              Aleksey Yeschenko
              Sylvain Lebresne
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: