[
https://issues.apache.org/jira/browse/CASSANDRA-18271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Miklosovic updated CASSANDRA-18271:
------------------------------------------
Change Category: Code Clarity
Complexity: Challenging
Component/s: Local/Snapshots
Fix Version/s: 4.x
Status: Open (was: Triage Needed)
> 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: 4.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, these all methods are in potentially unsafe.
> {code}
> 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 synchronized 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: [email protected]
For additional commands, e-mail: [email protected]