[ https://issues.apache.org/jira/browse/CASSANDRA-19939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17884490#comment-17884490 ]
Brad Schoening edited comment on CASSANDRA-19939 at 9/25/24 3:34 AM: --------------------------------------------------------------------- [~smiklosovic] This will be very useful tool to have. It seems to display row and partition tombstones correctly, but skips cell, TTL expired, or range tombstones. I ran the examples from this blog post [Tombstones in Apache Cassandra|https://medium.com/walmartglobaltech/tombstones-in-apache-cassandra-d0a068a72dcc] and added an example for range delete also. {{insert into item_price ( store_number, item_id, price, replacements, product_code) VALUES ( 'CA110', 'item110', 3.50, \{'item110-r', 'item110-r2'}, 'p110' );}} {{insert into item_price ( store_number, item_id, price, replacements, product_code) VALUES ( 'CA110', 'item110', 4.50, \{'item110-r', 'item110-r2'}, 'p110' );}} {{insert into item_price ( store_number, item_id, price, replacements, product_code) VALUES ( 'CA110', 'item110', 5.50, \{'item110-r', 'item110-r2'}, 'p110' );}} {{insert into item_price ( store_number, item_id, price, replacements, product_code) VALUES ( 'CA110', 'item110', 6.50, \{'item110-r', 'item110-r2'}, 'p110' );}} {{delete from item_price where store_number = 'CA110' and item_id='item110' and price > 5.0;}} {code:java} # full dump with tombstones not displayed with '-o' $sstabledump filename ... ### expired TTL "table kind" : "REGULAR", "partition" : { "key" : [ "CA103" ], "position" : 20 }, "rows" : [ { "type" : "row", "position" : 39, "clustering" : [ "item103", 3.5 ], "liveness_info" : { "tstamp" : "2024-09-25T02:53:24.461836Z", "ttl" : 60, "expires_at" : "2024-09-25T02:54:24Z", "expired" : true }, "cells" : [ { "name" : "product_code", "deletion_info" : { "local_delete_time" : "2024-09-25T02:53:24Z" } }, { "name" : "replacements", "deletion_info" : { "local_delete_time" : "2024-09-25T02:53:24Z" } } ] } ] ### cell tombstone "table kind" : "REGULAR", "partition" : { "key" : [ "CA104" ], "position" : 0 }, "rows" : [ { "type" : "row", "position" : 19, "clustering" : [ "item104", 4.5 ], "liveness_info" : { "tstamp" : "2024-09-25T03:04:16.728162Z" }, "cells" : [ { "name" : "product_code", "value" : "p104" }, { "name" : "replacements", "deletion_info" : { "local_delete_time" : "2024-09-25T03:04:16Z" } } ] } ] ### range tombstone { "type" : "range_tombstone_bound", "start" : { "type" : "exclusive", "clustering" : [ "item110", 5.0 ], "deletion_info" : { "marked_deleted" : "2024-09-25T03:15:13.642352Z", "local_delete_time" : "2024-09-25T03:15:13Z" } } }, { "type" : "range_tombstone_bound", "end" : { "type" : "inclusive", "clustering" : [ "item110", "*" ], "deletion_info" : { "marked_deleted" : "2024-09-25T03:15:13.642352Z", "local_delete_time" : "2024-09-25T03:15:13Z" } } }{code} TTL and cell tombstones were skipped when sstabledump was run with '-o was (Author: bschoeni): [~smiklosovic] This will be very useful tool to have. It seems to display row and partition tombstones, but skips cell, TTL expired, or range tombstones. I ran the examples from this blog post [Tombstones in Apache Cassandra|https://medium.com/walmartglobaltech/tombstones-in-apache-cassandra-d0a068a72dcc] and added an example for range delete also. {{insert into item_price ( store_number, item_id, price, replacements, product_code) VALUES ( 'CA110', 'item110', 3.50, \{'item110-r', 'item110-r2'}, 'p110' );}} {{insert into item_price ( store_number, item_id, price, replacements, product_code) VALUES ( 'CA110', 'item110', 4.50, \{'item110-r', 'item110-r2'}, 'p110' );}} {{insert into item_price ( store_number, item_id, price, replacements, product_code) VALUES ( 'CA110', 'item110', 5.50, \{'item110-r', 'item110-r2'}, 'p110' );}} {{insert into item_price ( store_number, item_id, price, replacements, product_code) VALUES ( 'CA110', 'item110', 6.50, \{'item110-r', 'item110-r2'}, 'p110' );}} {{delete from item_price where store_number = 'CA110' and item_id='item110' and price > 5.0;}} {code:java} # full dump with tombstones not displayed with '-o' $sstabledump filename ... ### expired TTL "table kind" : "REGULAR", "partition" : { "key" : [ "CA103" ], "position" : 20 }, "rows" : [ { "type" : "row", "position" : 39, "clustering" : [ "item103", 3.5 ], "liveness_info" : { "tstamp" : "2024-09-25T02:53:24.461836Z", "ttl" : 60, "expires_at" : "2024-09-25T02:54:24Z", "expired" : true }, "cells" : [ { "name" : "product_code", "deletion_info" : { "local_delete_time" : "2024-09-25T02:53:24Z" } }, { "name" : "replacements", "deletion_info" : { "local_delete_time" : "2024-09-25T02:53:24Z" } } ] } ] ### cell tombstone "table kind" : "REGULAR", "partition" : { "key" : [ "CA104" ], "position" : 0 }, "rows" : [ { "type" : "row", "position" : 19, "clustering" : [ "item104", 4.5 ], "liveness_info" : { "tstamp" : "2024-09-25T03:04:16.728162Z" }, "cells" : [ { "name" : "product_code", "value" : "p104" }, { "name" : "replacements", "deletion_info" : { "local_delete_time" : "2024-09-25T03:04:16Z" } } ] } ] ### range tombstone { "type" : "range_tombstone_bound", "start" : { "type" : "exclusive", "clustering" : [ "item110", 5.0 ], "deletion_info" : { "marked_deleted" : "2024-09-25T03:15:13.642352Z", "local_delete_time" : "2024-09-25T03:15:13Z" } } }, { "type" : "range_tombstone_bound", "end" : { "type" : "inclusive", "clustering" : [ "item110", "*" ], "deletion_info" : { "marked_deleted" : "2024-09-25T03:15:13.642352Z", "local_delete_time" : "2024-09-25T03:15:13Z" } } }{code} TTL and cell tombstones were skipped when sstabledump was run with '-o > Add sstabledump option to display only tombstones > ------------------------------------------------- > > Key: CASSANDRA-19939 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19939 > Project: Cassandra > Issue Type: New Feature > Components: Tool/sstable > Reporter: Brad Schoening > Assignee: Stefan Miklosovic > Priority: Normal > Time Spent: 10m > Remaining Estimate: 0h > > The utility sstabledump would be more useful if it had an option to display > just tombsones, much like the -e option to display only partition keys. > When tombstones exist, it should display the partition key, clustering > columns and the range, row or cell tombstone. > When investigating tombstone issues, a common way is to run sstabledump. > However, the output can be very large, on the order of gigabytes and scanning > the JSON output for tombstone entries is a hunt-and-peck experience or > requires using a tool like 'jq'. Being able to just view the tombstones > would eliminate the issue of the output being too large and not require > extraneous tools. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org