Stefan Miklosovic created CASSANDRA-18271:
---------------------------------------------
Summary: Centralize all snapshot operations to SnapshotManager
Key: CASSANDRA-18271
URL: https://issues.apache.org/jira/browse/CASSANDRA-18271
Project: Cassandra
Issue Type: Improvement
Reporter: Stefan Miklosovic
Assignee: Stefan Miklosovic
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]