diff --git a/replica/table.cc b/replica/table.cc index b6a815578e..3cf15a87db 100644 --- a/replica/table.cc +++ b/replica/table.cc @@ -1391,9 +1391,6 @@ table::seal_snapshot(sstring jsondir, std::vector 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);