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

Improve compaction param "provide_overlapping_tombstones" handling

    XMLWordPrintableJSON

Details

    • Degradation - Other Exception
    • Low
    • Low Hanging Fruit
    • Adhoc Test
    • All
    • None
    • Hide

      Added tests against CQL Completion, as well as Java unit test of error message (and success).

      Ran full suite of tests for pylib via cassandra-cqlsh-tests.sh (though not all passed for the 3.11 branch as is), was able to compare before and after patch and avoided failures (as well as my own changes succeeding).

      Show
      Added tests against CQL Completion, as well as Java unit test of error message (and success). Ran full suite of tests for pylib via cassandra-cqlsh-tests.sh (though not all passed for the 3.11 branch as is), was able to compare before and after patch and avoided failures (as well as my own changes succeeding).

    Description

      We currently have no cqlsh autocompletion for provide_overlapping_tombstones. We should also improve the validation for the parameter given as it is currently quite unhelpful:

      cqlsh:x> create table z (id int primary key, x int) with compaction = {'class': 'SizeTieredCompactionStrategy', 'provide_overlapping_tombstones':'xyz'};
      NoHostAvailable:
      

      and an exception in the logs;

      ERROR [Native-Transport-Requests-1] 2020-12-14 13:25:46,575 QueryMessage.java:121 - Unexpected error during query
      java.lang.IllegalArgumentException: No enum constant org.apache.cassandra.schema.CompactionParams.TombstoneOption.XYZ
              at java.lang.Enum.valueOf(Enum.java:238)
              at org.apache.cassandra.schema.CompactionParams$TombstoneOption.valueOf(CompactionParams.java:59)
              at org.apache.cassandra.schema.CompactionParams.create(CompactionParams.java:98)
              at org.apache.cassandra.schema.CompactionParams.fromMap(CompactionParams.java:255)
              at org.apache.cassandra.cql3.statements.schema.TableAttributes.build(TableAttributes.java:98)
              at org.apache.cassandra.cql3.statements.schema.TableAttributes.validate(TableAttributes.java:58)
              at org.apache.cassandra.cql3.statements.schema.CreateTableStatement.builder(CreateTableStatement.java:145)
              at org.apache.cassandra.cql3.statements.schema.CreateTableStatement.apply(CreateTableStatement.java:104)
              at org.apache.cassandra.schema.Schema.transform(Schema.java:587)
              at org.apache.cassandra.schema.MigrationManager.lambda$announce$2(MigrationManager.java:221)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
              at java.lang.Thread.run(Thread.java:748)
      
      

      Attachments

        Issue Links

          Activity

            People

              bhouser Brian Houser
              marcuse Marcus Eriksson
              Brian Houser
              Marcus Eriksson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m