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 2024/06/18 12:35:00 UTC

[jira] [Commented] (CASSANDRA-18271) Centralize all snapshot operations to SnapshotManager

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

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

I made a lot of consolidation as part of CASSANDRA-18111.

> 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-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org