[ https://issues.apache.org/jira/browse/CASSANDRA-18271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17693677#comment-17693677 ]
Paulo Motta commented on CASSANDRA-18271: ----------------------------------------- I was planning to do this on CASSANDRA-18111, but this work got a bit delayed. If you're interested I can rebase my branch and post an initial patch for review/discussion. > 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, 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