axonops / axonops-workbench-cassandra

AxonOps™ Workbench for Apache Cassandra® - Desktop application for Mac, Windows and Linux
https://axonops.com
Apache License 2.0
7 stars 0 forks source link

[bug] Tree schema navigator shows incorrect information #220

Closed hshimizu closed 2 weeks ago

hshimizu commented 1 month ago

image

for

CREATE TABLE system_auth.resource_role_permissons_index ( resource text, role text, PRIMARY KEY (resource, role) ) WITH CLUSTERING ORDER BY (role ASC) AND additional_write_policy = '99p' AND bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} AND comment = 'index of db roles with permissions granted on a resource' AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} AND compression = {'chunk_length_in_kb': '16', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} AND crc_check_chance = 1.0 AND default_time_to_live = 0 AND gc_grace_seconds = 7776000 AND max_index_interval = 2048 AND memtable_flush_period_in_ms = 0 AND min_index_interval = 128 AND read_repair = 'BLOCKING' AND speculative_retry = '99p';

hshimizu commented 1 month ago

image

for

CREATE TABLE system_distributed.parent_repair_history (
    parent_id timeuuid PRIMARY KEY,
    columnfamily_names set<text>,
    exception_message text,
    exception_stacktrace text,
    finished_at timestamp,
    keyspace_name text,
    options map<text, text>,
    requested_ranges set<text>,
    started_at timestamp,
    successful_ranges set<text>
) WITH additional_write_policy = '99p'
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
    AND comment = 'Repair history'
    AND compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', 'compaction_window_size': '1', 'compaction_window_unit': 'DAYS', 'max_threshold': '32', 'min_threshold': '4'}
    AND compression = {'chunk_length_in_kb': '16', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND default_time_to_live = 2592000
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair = 'BLOCKING'
    AND speculative_retry = '99p';
millerjp commented 1 month ago

@mhmdkrmabd it looks like the column count is being skewed as non-table columns are being added as columns in there eg keyspace, table etc.. Also, there seems to be issues around the identifying clustering columns.

Also make sure to test with a compound partition key and with multiple clustering columns eg

CREATE TABLE mytable (
column1 text,
column2 text,
column3 text,
column4 text,
column5 text,
PRIMARY KEY ((column1, column2), column3, column4)
) 

column1, column2 are the partition keys column3 is a clustering column column4 is a clustering column

mhmdkrmabd commented 4 weeks ago

@millerjp @hshimizu this is related to issue #230, I wasn't able to reproduce this issue again, however, the same approach to fix the related issue has been adopted

Image

Image