table: snapshot: move pending_snapshots.erase from seal_snapshot
Now that seal_snapshot doesn't need to lookup the snapshot_manager in pending_snapshots to get to the file_sets, erasing the snapshot_manager object can be done in table::snapshot which also inserted it there. This will make it easier to get rid of it in a later patch. Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
@@ -1391,9 +1391,6 @@ table::seal_snapshot(sstring jsondir, std::vector<snapshot_file_set> file_sets)
|
||||
});
|
||||
}).then([jsondir] {
|
||||
return io_check(sync_directory, std::move(jsondir));
|
||||
}).finally([jsondir] {
|
||||
pending_snapshots.erase(jsondir);
|
||||
return make_ready_future<>();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1511,6 +1508,7 @@ future<> table::snapshot(database& db, sstring name) {
|
||||
} catch (...) {
|
||||
ex = std::current_exception();
|
||||
}
|
||||
pending_snapshots.erase(jsondir);
|
||||
snapshot->manifest_write.signal(smp::count);
|
||||
}
|
||||
tlogger.debug("snapshot {}: waiting for manifest on behalf of shard {}", jsondir, requester);
|
||||
|
||||
Reference in New Issue
Block a user