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

Stefan Miklosovic commented on CASSANDRA-18271:
-----------------------------------------------

This will be delivered under CASSANDRA-18111 as these tickets are somehow 
intertwined and I started with 18111 already and discussion is happening there. 
Closing this one. 

> Centralize all snapshot operations to SnapshotManager
> -----------------------------------------------------
>
>                 Key: CASSANDRA-18271
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18271
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local/Snapshots
>            Reporter: Stefan Miklosovic
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>             Fix For: 5.x
>
>
> Currently, there is a lot of places where snapshotting logic is in place, 
> scattered across the codebase. We should centralize snapshotting logic under 
> SnapshotManager so every place in the code interacts only with that. This 
> should remove whole class of possible synchronization problems. Merely 
> looking into the code, all these methods are potentially unsafe.
> {code:java}
> public Map<String, TableSnapshot> listSnapshots()
> protected TableSnapshot buildSnapshot(String tag, SnapshotManifest manifest, 
> Set<File> snapshotDirs) {
> protected static SnapshotManifest maybeLoadManifest(String keyspace, String 
> table, String tag, Set<File> snapshotDirs)
> public List<String> listEphemeralSnapshots()
> private List<File> listAllSnapshots()
> protected Map<String, Set<File>> listSnapshotDirsByTag()
> public boolean snapshotExists(String snapshotName)
> public static void clearSnapshot(String snapshotName, List<File> 
> tableDirectories, RateLimiter snapshotRateLimiter)
> public static void removeSnapshotDirectory(RateLimiter snapshotRateLimiter, 
> File snapshotDir)
> public long trueSnapshotsSize()
> {code}



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

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

Reply via email to