diff --git a/database.cc b/database.cc index bfe12a38fb..f0b74d3efa 100644 --- a/database.cc +++ b/database.cc @@ -4256,6 +4256,7 @@ future<> table::fail_streaming_mutations(utils::UUID plan_id) { _streaming_memtables_big.erase(it); return entry->flush_in_progress.close().then([this, entry] { for (auto&& sst : entry->sstables) { + sst.monitor->write_failed(); sst.sstable->mark_for_deletion(); } }); diff --git a/database.hh b/database.hh index c981d1c47b..9cb5fd5ca2 100644 --- a/database.hh +++ b/database.hh @@ -298,6 +298,8 @@ public: class table; using column_family = table; +class database_sstable_write_monitor; + class table : public enable_lw_shared_from_this { public: struct config { @@ -395,7 +397,7 @@ private: // plan memtables and the resulting sstables are not made visible until // the streaming is complete. struct monitored_sstable { - std::unique_ptr monitor; + std::unique_ptr monitor; sstables::shared_sstable sstable; };