Re: nodetool listsnapshots and auto snapshots from dropped tables

2021-08-11 Thread Erick Ramirez
Awesome! Thanks, mate! 

>


Re: nodetool listsnapshots and auto snapshots from dropped tables

2021-08-11 Thread James Brown
I filed this as CASSANDRA-16843
. I also repro'd it
on 4.0.0 just to make sure nobody snuck in a fix.

On Tue, Aug 10, 2021 at 6:39 PM Erick Ramirez 
wrote:

> Dropped tables used to be handled differently and were no longer tracked
> once they were dropped. The clearsnapshot command was fixed (
> CASSANDRA-6418 )
> but listsnapshots doesn't appear to be (for whatever reason). It looks like
> an oversight to me. Would you mind logging a ticket for it --
> https://issues.apache.org/jira/secure/CreateIssue.jspa?pid=12310865?
> Cheers!
>
>>

-- 
James Brown
Engineer


Re: nodetool listsnapshots and auto snapshots from dropped tables

2021-08-10 Thread Erick Ramirez
Dropped tables used to be handled differently and were no longer tracked
once they were dropped. The clearsnapshot command was fixed (CASSANDRA-6418
) but listsnapshots
doesn't appear to be (for whatever reason). It looks like an oversight to
me. Would you mind logging a ticket for it --
https://issues.apache.org/jira/secure/CreateIssue.jspa?pid=12310865? Cheers!

>


nodetool listsnapshots and auto snapshots from dropped tables

2021-08-10 Thread James Brown
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 nameKeyspace name Column family name True size
Size on disk
truncated-1628638955444-test eventstest   4.8 KiB
5.63 KiB

Total TrueDiskSpaceUsed: 4.8 KiB



This is on Cassandra 3.11.11, FWIW.

-- 
James Brown
Systems Engineer


Re: nodetool listsnapshots

2018-11-02 Thread Lou DeGenaro
Is more information needed, for example from logs or verbose running?  Is
anyone else seeing this behaviour?

Thanks.

Lou.

On 2018/10/30 15:36:38, Lou DeGenaro  wrote:
> It seems that "nodetool listsnapshots" is unreliable?>
>
> 1. when issued, nodetool listsnapshots reports there are no snapshops.>
> 2. when navigating through the filesystem, one can see clearly that
there>
> are snapshots>
> 3. when issued, nodetool clearsnapshot removes them!>
>
> Some sanitized evidence below.>
>
> Is "nodetool listsnapshots" broken or it is user error?>
>
> Lou.>
>
> ->
>
> [user@node]$ nodetool version>
> ReleaseVersion: 3.0.9>
> []user@node$ nodetool listsnapshots>
> Snapshot Details:>
> There are no snapshots[user@node]$>
> [user@node]$ nodetool  tablestats -- keyspace.tablename>
> Keyspace: keyspace>
> Read Count: 15>
> Read Latency: 1.54693335 ms.>
> Write Count: 254>
> Write Latency: 0.021818897637795275 ms.>
> Pending Flushes: 0>
> Table: tablename>
> SSTable count: 0>
> Space used (live): 0>
> Space used (total): 0>
> Space used by snapshots (total): 0>
> $ du -s tablename-66cad240c8a411e89e9ad7bcfb03d529/*>
> 0tablename-66cad240c8a411e89e9ad7bcfb03d529/backups>
> 714964tablename-66cad240c8a411e89e9ad7bcfb03d529/snapshots>
>


nodetool listsnapshots

2018-10-30 Thread Lou DeGenaro
It seems that "nodetool listsnapshots" is unreliable?

1. when issued, nodetool listsnapshots reports there are no snapshops.
2. when navigating through the filesystem, one can see clearly that there
are snapshots
3. when issued, nodetool clearsnapshot removes them!

Some sanitized evidence below.

Is "nodetool listsnapshots" broken or it is user error?

Lou.

-

[user@node]$ nodetool version
ReleaseVersion: 3.0.9
[]user@node$ nodetool listsnapshots
Snapshot Details:
There are no snapshots[user@node]$
[user@node]$ nodetool  tablestats -- keyspace.tablename
Keyspace: keyspace
Read Count: 15
Read Latency: 1.54693335 ms.
Write Count: 254
Write Latency: 0.021818897637795275 ms.
Pending Flushes: 0
Table: tablename
SSTable count: 0
Space used (live): 0
Space used (total): 0
Space used by snapshots (total): 0
$ du -s tablename-66cad240c8a411e89e9ad7bcfb03d529/*
0tablename-66cad240c8a411e89e9ad7bcfb03d529/backups
714964tablename-66cad240c8a411e89e9ad7bcfb03d529/snapshots