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

Altering keyspace truncates DESCRIBE output until you reconnect.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.1.3
    • None
    • Low

    Description

      Run DESCRIBE on a keyspace:

      cqlsh> DESCRIBE KEYSPACE system_traces ;
      
      CREATE KEYSPACE system_traces WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '2'}  AND durable_writes = true;
      
      
      CREATE TABLE system_traces.events (
          session_id uuid,
          event_id timeuuid,
          activity text,
          source inet,
          source_elapsed int,
          thread text,
          PRIMARY KEY (session_id, event_id)
      ) WITH CLUSTERING ORDER BY (event_id ASC)
          AND bloom_filter_fp_chance = 0.01
          AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
          AND comment = ''
          AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'}
          AND compression = {'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 = 0
          AND max_index_interval = 2048
          AND memtable_flush_period_in_ms = 3600000
          AND min_index_interval = 128
          AND read_repair_chance = 0.0
          AND speculative_retry = '99.0PERCENTILE';
      
      CREATE TABLE system_traces.sessions (
          session_id uuid PRIMARY KEY,
          coordinator inet,
          duration int,
          parameters map<text, text>,
          request text,
          started_at timestamp
      ) WITH bloom_filter_fp_chance = 0.01
          AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
          AND comment = 'traced sessions'
          AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'}
          AND compression = {'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 = 0
          AND max_index_interval = 2048
          AND memtable_flush_period_in_ms = 3600000
          AND min_index_interval = 128
          AND read_repair_chance = 0.0
          AND speculative_retry = '99.0PERCENTILE';
      

      Alter it and run DESCRIBE again:

      cqlsh> ALTER KEYSPACE system_traces WITH durable_writes = false;
      cqlsh> DESCRIBE KEYSPACE system_traces ;
      
      CREATE KEYSPACE system_traces WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '2'}  AND durable_writes = false;
      

      You can issue the DESCRIBE command multiple times and get the same output. You have to disconnect and reconnect to get the table definition output to show again.

      Attachments

        Issue Links

          Activity

            People

              thobbs Tom Hobbs
              enigmacurry Ryan McGuire
              Tom Hobbs
              Ryan McGuire Ryan McGuire
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: