mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 21:47:10 +00:00
sstable: Remove explicit quarantization call
Now all callers are patched to use new change_state() call, so it can be removed. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
@@ -2224,18 +2224,6 @@ future<> sstable::filesystem_storage::move(const sstable& sst, sstring new_dir,
|
||||
}
|
||||
}
|
||||
|
||||
future<> sstable::filesystem_storage::quarantine(const sstable& sst, delayed_commit_changes* delay_commit) {
|
||||
auto path = fs::path(dir);
|
||||
if (path.filename().native() == staging_dir) {
|
||||
path = path.parent_path();
|
||||
}
|
||||
// Note: moving a sstable in a snapshot or in the uploads dir to quarantine
|
||||
// will move it into a "quarantine" subdirectory of its current directory.
|
||||
auto new_dir = (path / sstables::quarantine_dir).native();
|
||||
sstlog.info("Moving SSTable {} to quarantine in {}", sst.get_filename(), new_dir);
|
||||
co_await move(sst, std::move(new_dir), sst.generation(), delay_commit);
|
||||
}
|
||||
|
||||
future<> sstable::filesystem_storage::change_state(const sstable& sst, sstring to, generation_type new_generation, delayed_commit_changes* delay_commit) {
|
||||
auto path = fs::path(dir);
|
||||
auto current = path.filename().native();
|
||||
@@ -2265,14 +2253,6 @@ future<> sstable::filesystem_storage::change_state(const sstable& sst, sstring t
|
||||
co_await move(sst, path.native(), std::move(new_generation), delay_commit);
|
||||
}
|
||||
|
||||
future<> sstable::move_to_quarantine(delayed_commit_changes* delay_commit) {
|
||||
if (is_quarantined()) {
|
||||
return make_ready_future<>();
|
||||
}
|
||||
|
||||
return _storage.quarantine(*this, delay_commit);
|
||||
}
|
||||
|
||||
future<> sstable::change_state(sstring to, delayed_commit_changes* delay_commit) {
|
||||
co_await _storage.change_state(*this, to, _generation, delay_commit);
|
||||
}
|
||||
|
||||
@@ -210,16 +210,6 @@ public:
|
||||
// No other uses of the object can happen at this point.
|
||||
future<> destroy();
|
||||
|
||||
// Move the sstable to the quarantine_dir
|
||||
//
|
||||
// If the sstable is alredy quarantined, this is a noop.
|
||||
// If the sstable is in the base directory or in the staging_dir,
|
||||
// it is moved into the quarantine_dir subdirectory of the base directory.
|
||||
//
|
||||
// Note: moving a sstable in any other dir to quarantine
|
||||
// will move it into a quarantine_dir subdirectory of its current directory.
|
||||
future<> move_to_quarantine(delayed_commit_changes* delay = nullptr);
|
||||
|
||||
// Move the sstable between states
|
||||
//
|
||||
// Known states are normal, staging, upload and quarantine.
|
||||
@@ -501,7 +491,6 @@ public:
|
||||
using absolute_path = bool_class<class absolute_path_tag>; // FIXME -- should go away eventually
|
||||
future<> seal(const sstable& sst);
|
||||
future<> snapshot(const sstable& sst, sstring dir, absolute_path abs) const;
|
||||
future<> quarantine(const sstable& sst, delayed_commit_changes* delay);
|
||||
|
||||
// Moves the files around with .move() method. States are basedir subdirectories
|
||||
// with the exception that normal state maps to the basedir itself. If the sstable
|
||||
|
||||
Reference in New Issue
Block a user