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

Francisco Guerrero edited comment on CASSANDRA-18111 at 6/21/24 1:11 PM:
-------------------------------------------------------------------------

I was just discussing with Yifan about how to maintain backwards compatibility 
for this file. What I would propose is something that looks like this instead:

{code:json}
{ "files" : ["oa-1-big-Data.db", "oa-2-big-Data.db", "oa-3-big-Data.db", 
"someothersstablecomponent"], "file_sizes" : [123, 123, 123, 123], 
"file_checksums" : ["1234", "1234", "1234", "1234"], "created_at" : 
"2024-06-18T10:49:22.789Z", "expires_at" : null, "ephemeral" : false}
{code}

This way we simplify the reading logic on newer versions where we would need to 
support reading both the old and new format.


was (Author: frankgh):
I was just discussing with Yifan about how to maintain backwards compatibility 
for this file. What I would propose is something that looks like this instead:
 

{{{ "files" : ["oa-1-big-Data.db", "oa-2-big-Data.db", "oa-3-big-Data.db", 
"someothersstablecomponent"], "file_sizes" : [123, 123, 123, 123], 
"file_checksums" : ["1234", "1234", "1234", "1234"], "created_at" : 
"2024-06-18T10:49:22.789Z", "expires_at" : null, "ephemeral" : false}}}

This way we simplify the reading logic on newer versions where we would need to 
support reading both the old and new format.

> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to