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

twcs sstables gets merged following node removal

    XMLWordPrintableJSON

Details

    • Normal

    Description

      after removing a node from the cluster, a table that is defined as twcs, has sstables from different time windows merged together, making old and new data sit in the same sstable.

      CREATE KEYSPACE gil_test WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '2'} AND durable_writes = true;

      CREATE TABLE gil_test.my_test (
      id int,
      creation_time timestamp,
      name text,
      PRIMARY KEY (id, creation_time)
      ) WITH CLUSTERING ORDER BY (creation_time ASC)
      AND bloom_filter_fp_chance = 0.01
      AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
      AND comment = ''
      AND compaction = {'compaction_window_unit': 'HOURS', 'compaction_window_size': '2', 'class': 'TimeWindowCompactionStrategy'}
      AND compression = {'chunk_length_kb': '4', 'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
      AND dclocal_read_repair_chance = 0.0
      AND default_time_to_live = 0
      AND gc_grace_seconds = 3600
      AND max_index_interval = 2048
      AND memtable_flush_period_in_ms = 0
      AND min_index_interval = 128
      AND read_repair_chance = 0.0
      AND speculative_retry = 'NONE';

       

      3 nodes cluster

      before removing node number 3 - directory listing

      drwxr-xr-x 2 cassandra cassandra 4096 Dec 10 20:28 backups
      rw-rr- 1 cassandra cassandra 51 Dec 10 22:10 mc-16-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 2044 Dec 10 22:10 mc-16-big-Data.db
      rw-rr- 1 cassandra cassandra 9 Dec 10 22:10 mc-16-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 64 Dec 10 22:10 mc-16-big-Filter.db
      rw-rr- 1 cassandra cassandra 375 Dec 10 22:10 mc-16-big-Index.db
      rw-rr- 1 cassandra cassandra 4805 Dec 10 22:10 mc-16-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 10 22:10 mc-16-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 10 22:10 mc-16-big-TOC.txt
      rw-rr- 1 cassandra cassandra 51 Dec 11 00:00 mc-31-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 2343 Dec 11 00:00 mc-31-big-Data.db
      rw-rr- 1 cassandra cassandra 10 Dec 11 00:00 mc-31-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 72 Dec 11 00:00 mc-31-big-Filter.db
      rw-rr- 1 cassandra cassandra 411 Dec 11 00:00 mc-31-big-Index.db
      rw-rr- 1 cassandra cassandra 4816 Dec 11 00:00 mc-31-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 00:00 mc-31-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 00:00 mc-31-big-TOC.txt
      rw-rr- 1 cassandra cassandra 51 Dec 11 02:00 mc-47-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 2732 Dec 11 02:00 mc-47-big-Data.db
      rw-rr- 1 cassandra cassandra 9 Dec 11 02:00 mc-47-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 80 Dec 11 02:00 mc-47-big-Filter.db
      rw-rr- 1 cassandra cassandra 475 Dec 11 02:00 mc-47-big-Index.db
      rw-rr- 1 cassandra cassandra 4835 Dec 11 02:00 mc-47-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 02:00 mc-47-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 02:00 mc-47-big-TOC.txt
      rw-rr- 1 cassandra cassandra 51 Dec 11 04:00 mc-63-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 2504 Dec 11 04:00 mc-63-big-Data.db
      rw-rr- 1 cassandra cassandra 10 Dec 11 04:00 mc-63-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 72 Dec 11 04:00 mc-63-big-Filter.db
      rw-rr- 1 cassandra cassandra 430 Dec 11 04:00 mc-63-big-Index.db
      rw-rr- 1 cassandra cassandra 4823 Dec 11 04:00 mc-63-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 04:00 mc-63-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 04:00 mc-63-big-TOC.txt
      rw-rr- 1 cassandra cassandra 43 Dec 11 06:10 mc-79-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 317 Dec 11 06:10 mc-79-big-Data.db
      rw-rr- 1 cassandra cassandra 10 Dec 11 06:10 mc-79-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 24 Dec 11 06:10 mc-79-big-Filter.db
      rw-rr- 1 cassandra cassandra 69 Dec 11 06:10 mc-79-big-Index.db
      rw-rr- 1 cassandra cassandra 4698 Dec 11 06:10 mc-79-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 06:10 mc-79-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 06:10 mc-79-big-TOC.txt
      rw-rr- 1 cassandra cassandra 51 Dec 11 06:10 mc-80-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 2327 Dec 11 06:10 mc-80-big-Data.db
      rw-rr- 1 cassandra cassandra 9 Dec 11 06:10 mc-80-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 72 Dec 11 06:10 mc-80-big-Filter.db
      rw-rr- 1 cassandra cassandra 430 Dec 11 06:10 mc-80-big-Index.db
      rw-rr- 1 cassandra cassandra 4821 Dec 11 06:10 mc-80-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 06:10 mc-80-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 06:10 mc-80-big-TOC.txt
      rw-rr- 1 cassandra cassandra 43 Dec 11 06:20 mc-81-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 234 Dec 11 06:20 mc-81-big-Data.db
      rw-rr- 1 cassandra cassandra 10 Dec 11 06:20 mc-81-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 24 Dec 11 06:20 mc-81-big-Filter.db
      rw-rr- 1 cassandra cassandra 42 Dec 11 06:20 mc-81-big-Index.db
      rw-rr- 1 cassandra cassandra 4688 Dec 11 06:20 mc-81-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 06:20 mc-81-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 06:20 mc-81-big-TOC.txt
      rw-rr- 1 cassandra cassandra 43 Dec 11 06:30 mc-82-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 245 Dec 11 06:30 mc-82-big-Data.db
      rw-rr- 1 cassandra cassandra 9 Dec 11 06:30 mc-82-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 24 Dec 11 06:30 mc-82-big-Filter.db
      rw-rr- 1 cassandra cassandra 51 Dec 11 06:30 mc-82-big-Index.db
      rw-rr- 1 cassandra cassandra 4691 Dec 11 06:30 mc-82-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 06:30 mc-82-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 06:30 mc-82-big-TOC.txt

      after stopping node number 3 and running removenode

      drwxr-xr-x 2 cassandra cassandra 4096 Dec 10 20:28 backups
      rw-rr- 1 cassandra cassandra 43 Dec 11 06:37 mc-83-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 53 Dec 11 06:37 mc-83-big-Data.db
      rw-rr- 1 cassandra cassandra 10 Dec 11 06:37 mc-83-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 16 Dec 11 06:37 mc-83-big-Filter.db
      rw-rr- 1 cassandra cassandra 8 Dec 11 06:37 mc-83-big-Index.db
      rw-rr- 1 cassandra cassandra 4648 Dec 11 06:37 mc-83-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 06:37 mc-83-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 06:37 mc-83-big-TOC.txt
      rw-rr- 1 cassandra cassandra 43 Dec 11 06:37 mc-85-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 321 Dec 11 06:37 mc-85-big-Data.db
      rw-rr- 1 cassandra cassandra 10 Dec 11 06:37 mc-85-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 176 Dec 11 06:37 mc-85-big-Filter.db
      rw-rr- 1 cassandra cassandra 69 Dec 11 06:37 mc-85-big-Index.db
      rw-rr- 1 cassandra cassandra 4674 Dec 11 06:37 mc-85-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 06:37 mc-85-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 06:37 mc-85-big-TOC.txt
      rw-rr- 1 cassandra cassandra 51 Dec 11 06:37 mc-91-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 969 Dec 11 06:37 mc-91-big-Data.db
      rw-rr- 1 cassandra cassandra 10 Dec 11 06:37 mc-91-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 40 Dec 11 06:37 mc-91-big-Filter.db
      rw-rr- 1 cassandra cassandra 204 Dec 11 06:37 mc-91-big-Index.db
      rw-rr- 1 cassandra cassandra 4748 Dec 11 06:37 mc-91-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 06:37 mc-91-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 06:37 mc-91-big-TOC.txt
      rw-rr- 1 cassandra cassandra 59 Dec 11 06:37 mc-92-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 3567 Dec 11 06:37 mc-92-big-Data.db
      rw-rr- 1 cassandra cassandra 9 Dec 11 06:37 mc-92-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 96 Dec 11 06:37 mc-92-big-Filter.db
      rw-rr- 1 cassandra cassandra 601 Dec 11 06:37 mc-92-big-Index.db
      rw-rr- 1 cassandra cassandra 4877 Dec 11 06:37 mc-92-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 06:37 mc-92-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 06:37 mc-92-big-TOC.txt
      rw-rr- 1 cassandra cassandra 59 Dec 11 06:37 mc-93-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 3730 Dec 11 06:37 mc-93-big-Data.db
      rw-rr- 1 cassandra cassandra 9 Dec 11 06:37 mc-93-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 104 Dec 11 06:37 mc-93-big-Filter.db
      rw-rr- 1 cassandra cassandra 664 Dec 11 06:37 mc-93-big-Index.db
      rw-rr- 1 cassandra cassandra 4896 Dec 11 06:37 mc-93-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 06:37 mc-93-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 06:37 mc-93-big-TOC.txt
      rw-rr- 1 cassandra cassandra 59 Dec 11 06:37 mc-94-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 3641 Dec 11 06:37 mc-94-big-Data.db
      rw-rr- 1 cassandra cassandra 10 Dec 11 06:37 mc-94-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 104 Dec 11 06:37 mc-94-big-Filter.db
      rw-rr- 1 cassandra cassandra 646 Dec 11 06:37 mc-94-big-Index.db
      rw-rr- 1 cassandra cassandra 4890 Dec 11 06:37 mc-94-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 06:37 mc-94-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 06:37 mc-94-big-TOC.txt
      rw-rr- 1 cassandra cassandra 59 Dec 11 06:37 mc-95-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 3491 Dec 11 06:37 mc-95-big-Data.db
      rw-rr- 1 cassandra cassandra 10 Dec 11 06:37 mc-95-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 104 Dec 11 06:37 mc-95-big-Filter.db
      rw-rr- 1 cassandra cassandra 618 Dec 11 06:37 mc-95-big-Index.db
      rw-rr- 1 cassandra cassandra 4881 Dec 11 06:37 mc-95-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 06:37 mc-95-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 06:37 mc-95-big-TOC.txt
      rw-rr- 1 cassandra cassandra 59 Dec 11 06:37 mc-96-big-CompressionInfo.db
      rw-rr- 1 cassandra cassandra 2964 Dec 11 06:37 mc-96-big-Data.db
      rw-rr- 1 cassandra cassandra 10 Dec 11 06:37 mc-96-big-Digest.crc32
      rw-rr- 1 cassandra cassandra 96 Dec 11 06:37 mc-96-big-Filter.db
      rw-rr- 1 cassandra cassandra 564 Dec 11 06:37 mc-96-big-Index.db
      rw-rr- 1 cassandra cassandra 4867 Dec 11 06:37 mc-96-big-Statistics.db
      rw-rr- 1 cassandra cassandra 56 Dec 11 06:37 mc-96-big-Summary.db
      rw-rr- 1 cassandra cassandra 92 Dec 11 06:37 mc-96-big-TOC.txt

       

      log snippet shows old sstable being compacted with a newly created one 
      DEBUG [CompactionExecutor:13] 2018-12-11 06:37:53,581 CompactionTask.java:158 - Compacting (49979dd1-fd0f-11e8-88e0-af06e98804fb) [/var/lib/cassandra/data/gil_test/my_test-2b5138e0fcba11e888e0af06e98804fb/mc-31-big-Data.db:level=0, /var/lib/cassandra/data/gil_test/my_test-2b5138e0fcba11e888e0af06e98804fb/mc-89-big-Data.db:level=0, ]

      Attachments

        Activity

          People

            Unassigned Unassigned
            gilg Gil Ganz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: