You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Francisco Guerrero (Jira)" <ji...@apache.org> on 2024/06/20 17:39:00 UTC
[jira] [Commented] (CASSANDRA-18111) Centralize all snapshot operations to SnapshotManager and cache snapshots
[ https://issues.apache.org/jira/browse/CASSANDRA-18111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17856570#comment-17856570 ]
Francisco Guerrero commented on CASSANDRA-18111:
------------------------------------------------
Looking more closely at what we are keeping in memory for snapshots, this won't be an issue unless you have a really large number of snapshots (thanks Stefan for doing the work above). For low thousands of snapshots, this won't take up that much memory, so I don't have concerns there. My original concern came from keeping, in addition to the metadata, each snapshot file path in memory, which is not the case for what SnapshotManager is holding in memory.
> 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: 1h 10m
> 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: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org