I've noticed that auto snapshots from dropped tables don't seem to show up
in `nodetool listsnapshots` (even though they *do* get cleared by `nodetool
clearsnapshot`). Is there any reason for this? It's kind of weird that the
only way to discover auto-snapshots from dropped tables is to manually ls
in the data directory.

$ nodetool listsnapshots
Snapshot Details:
There are no snapshots
$ sudo bash -c 'ls
/srv/var/cassandra-events/data/data/events/events*/snapshots/dropped*/manifest.json'
| head -n 1
/srv/var/cassandra-events/data/data/events/events-573d0cd0755911ebaba963815a913a0b/snapshots/dropped-1620074520956-events/manifest.json
$ sudo bash -c 'ls
/srv/var/cassandra-events/data/data/events/events*/snapshots/dropped*/manifest.json'
| wc -l
10


Autosnapshots from truncated tables show up fine in nodetool listsnapshots;
it's just dropped tables that are invisible.

jbrown@cqlsh:events> CREATE TABLE test(id INT PRIMARY KEY);
jbrown@cqlsh:events> INSERT INTO test(id) VALUES(1);
jbrown@cqlsh:events> INSERT INTO test(id) VALUES(2);
jbrown@cqlsh:events> INSERT INTO test(id) VALUES(3);
jbrown@cqlsh:events> SELECT * FROM test;
 id
----
  1
  2
  3
(3 rows)
jbrown@cqlsh:events> TRUNCATE TABLE test;

$ nodetool listsnapshots
Snapshot Details:
Snapshot name                Keyspace name Column family name True size
Size on disk
truncated-1628638955444-test events        test               4.8 KiB
5.63 KiB

Total TrueDiskSpaceUsed: 4.8 KiB



This is on Cassandra 3.11.11, FWIW.

-- 
James Brown
Systems Engineer

Reply via email to