[
https://issues.apache.org/jira/browse/CASSANDRA-18111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17875464#comment-17875464
]
Stefan Miklosovic commented on CASSANDRA-18111:
-----------------------------------------------
[~paulo] I have consolidated what I wrote previously (1). I squashed it and put
one more commit on top which adds filtering capabilities on nodetool
listsnapshot for keyspace / table. I found it handy to add and put that
directly into that patch.
I think I have also fixed a bug, I think that cfs's getTrueDiskSize() didn't
include secondary indices. The reason is that when SSTableSizeSummer is used as
a visitor for Files.walkFileTree, then it's isAcceptable method will evaluate
"desc.cfname.equals(metadata.name)" as false hence a file in index dir will not
be counted in because desc.cfname includes also name of index (like "ks.tb.idx)
and metadata.name is just "ks.tb".
https://github.com/apache/cassandra/pull/3374
> Centralize all snapshot operations to SnapshotManager and cache snapshots
> -------------------------------------------------------------------------
>
> Key: CASSANDRA-18111
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18111
> Project: Cassandra
> Issue Type: Improvement
> Components: Local/Snapshots
> Reporter: Paulo Motta
> Assignee: Stefan Miklosovic
> Priority: Normal
> Fix For: 5.x
>
> Time Spent: 4h 50m
> Remaining Estimate: 0h
>
> Everytime {{nodetool listsnapshots}} is called, all data directories are
> scanned to find snapshots, what is inefficient.
> For example, fetching the
> {{org.apache.cassandra.metrics:type=ColumnFamily,name=SnapshotsSize}} metric
> can take half a second (CASSANDRA-13338).
> This improvement will also allow snapshots to be efficiently queried via
> virtual tables (CASSANDRA-18102).
> In order to do this, we should:
> a) load all snapshots from disk during initialization
> b) keep a collection of snapshots on {{SnapshotManager}}
> c) update the snapshots collection anytime a new snapshot is taken or cleared
> d) detect when a snapshot is manually removed from disk.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]