You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Stefan Miklosovic (Jira)" <ji...@apache.org> on 2022/09/28 08:33:00 UTC

[jira] (CASSANDRA-17588) "Total TrueDiskSpaceUsed" computation does not include manifest and schema files

    [ https://issues.apache.org/jira/browse/CASSANDRA-17588 ]


    Stefan Miklosovic deleted comment on CASSANDRA-17588:
    -----------------------------------------------

was (Author: smiklosovic):
This should be fixed from 3.0 to trunk. [~paulo] would you mind if I take over here? The fix is fairly easy, the main work would be to apply this correctly across 5 branches.

The main complication I see is how to compute this for dropped tables as well because they are not living in Cassandra anymore (it is not a ColumnFamily anymore), there are just data on disk.

listsnapshots is using ColumnFamilyStore.trueSnapshotsSize and summing all sizes for each cf, but dropped tables are not cf anymore and these are not included.

If you have a solution for this as well that would be great as I would not need to start from scratch.

I think it needs to be rewritten to sum what SnapshotLoader finds, not relying on what column families there are (in Cassandra context). This would mean that for Cassandra < 4.1 even we fixed this bug, it would not be fixed in cases when a dropped snapshot is involved. I think that is reasonable exception to do here.

> "Total TrueDiskSpaceUsed" computation does not include manifest and schema files
> --------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17588
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17588
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local/Snapshots
>            Reporter: Paulo Motta
>            Assignee: Paulo Motta
>            Priority: Normal
>
> This is the output of {{nodetool listsnapshots}}:
> {noformat}
> Snapshot Details:
> Snapshot name                  Keyspace name Column family name True size Size on disk Creation time            Expiration time
> test                           ks            indexed_table      1.1 KiB   21.22 KiB    2022-04-26T19:13:20.102Z
> test                           ks            my_table           960 bytes 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: 0 KiB
> {noformat}
> Total TrueDiskSpaceUsed does not match the sum of "true size on disk" of all snapshots.
> The reason for this is because {{Total TrueDiskSpaceUsed}} computation does not include the size of snapshot schema and manifest files.
> We should fix the {{Total TrueDiskSpaceUsed}} computation to include the the size of snapshot schema and manifest files, so it will look like this:
> {noformat}
> Snapshot Details:
> Snapshot name                  Keyspace name Column family name True size Size on disk Creation time            Expiration time
> test                           ks            indexed_table      1.1 KiB   21.22 KiB    2022-04-26T19:13:20.102Z
> test                           ks            my_table           960 bytes 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: 3 KiB
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org