[ 
https://issues.apache.org/jira/browse/CASSANDRA-16843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17529609#comment-17529609
 ] 

Paulo Motta edited comment on CASSANDRA-16843 at 4/28/22 11:12 PM:
-------------------------------------------------------------------

To provide some contextualization and recap before going into the 
implementation details, please find a little summary of what end-user changes 
will be made visible by this patch.

This is the current output of {{nodetool listsnapshots}} before this patch:
{noformat}
Snapshot Details:
Snapshot name Keyspace name Column family name True size Size on disk Creation 
time            Expiration time
test          ks            indexed_table      9.83 KiB  21.22 KiB    
2022-04-26T19:13:20.102Z
test          ks            my_table           9.83 KiB  10.76 KiB    
2022-04-26T19:13:20.102Z

Total TrueDiskSpaceUsed: 19.65 KiB
{noformat}
*The main problem being solved by this patch is that snapshots from dropped 
tables are omitted from this output.*

In addition to this, there are 2 additional issues with the previous output:
1) Snapshot "true size" column does not include {{manifest.json}} and 
{{schema.cql}} file sizes. This can be observed by the mismatching numbers in 
the "true size" (9.83 KiB) and "size on disk" (10.76 KiB) columns of 
{{my_table}}.
2) Snapshot "true size" of table with secondary index ({{indexed_table}}) does 
not include secondary index files (CASSANDRA-17357). This can be observed by 
the "true size" being 9.83 KiB while the "size on disk" is 21.22 KiB.

After this patch, the following output is displayed for the same data:
{noformat}
Snapshot Details:
Snapshot name                  Keyspace name Column family name True size Size 
on disk Creation time            Expiration time
test                           ks            indexed_table      21.22 KiB 21.22 
KiB    2022-04-26T19:13:20.102Z
test                           ks            my_table           10.76 KiB 10.76 
KiB    2022-04-26T19:13:20.102Z
dropped-1650997415751-my_table ks            my_table           989 bytes 989 
bytes    2022-04-26T18:23:35.751Z

Total TrueDiskSpaceUsed: 32.95 KiB
{noformat}
The new output after this patch shows the snapshot "true size" equal to the 
"size on disk" when there are no live sstables.

(will follow-up with implementation details on next comment)


was (Author: paulo):
To provide some contextualization and recap before going into the 
implementation details, please find a little summary of what end-user changes 
will be made visible by this patch.

This is the current output of {{nodetool listsnapshots}} before this patch:
{noformat}
Snapshot Details:
Snapshot name Keyspace name Column family name True size Size on disk Creation 
time            Expiration time
test          ks            indexed_table      9.83 KiB  21.22 KiB    
2022-04-26T19:13:20.102Z
test          ks            my_table           9.83 KiB  10.76 KiB    
2022-04-26T19:13:20.102Z

Total TrueDiskSpaceUsed: 19.65 KiB
{noformat}
*The main problem being solved by this patch is that snapshots from dropped 
tables are omitted from this output.*

In addition to this, there are 2 additional issues with the previous output:
1) Snapshot "true size" column does not include {{manifest.json}} and 
{{schema.cql}} file sizes. This can be observed by the mismatching numbers in 
the "true size" and "size on disk" columns of {{my_table}}.
2) Snapshot "true size" of table with secondary index ({{indexed_table}}) does 
not include secondary index files (CASSANDRA-17357). This can be observed by 
the "true size" being 9.83 KiB while the "size on disk" is 21.22 KiB.

After this patch, the following output is displayed for the same data:
{noformat}
Snapshot Details:
Snapshot name                  Keyspace name Column family name True size Size 
on disk Creation time            Expiration time
test                           ks            indexed_table      21.22 KiB 21.22 
KiB    2022-04-26T19:13:20.102Z
test                           ks            my_table           10.76 KiB 10.76 
KiB    2022-04-26T19:13:20.102Z
dropped-1650997415751-my_table ks            my_table           989 bytes 989 
bytes    2022-04-26T18:23:35.751Z

Total TrueDiskSpaceUsed: 32.95 KiB
{noformat}
The new output after this patch shows the snapshot "true size" equal to the 
"size on disk" when there are no live sstables.

(will follow-up with implementation details on next comment)

> List snapshots of dropped tables
> --------------------------------
>
>                 Key: CASSANDRA-16843
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16843
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local/Snapshots
>            Reporter: James Brown
>            Assignee: Paulo Motta
>            Priority: Normal
>             Fix For: 4.1
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Auto snapshots from dropped tables don't seem to show up in {{nodetool 
> listsnapshots}} (even though they do get cleared by {{nodetool 
> clearsnapshot}}). This makes them kind of annoying to clean up, since you 
> need to muck about in the data directory to find them.
> Erick on the mailing list said that this seems to be an oversight and that 
> clearsnapshot was fixed by 
> [CASSANDRA-6418|https://issues.apache.org/jira/browse/CASSANDRA-6418].
> I reproduced this both on 3.11.11 and 4.0.0.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to