sstables: fix use-after-free at the end of compaction

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
This commit is contained in:
Raphael S. Carvalho
2015-06-24 16:34:52 -03:00
committed by Avi Kivity
parent e0eb07abe9
commit b54d35dcbb

View File

@@ -63,7 +63,7 @@ future<> compact_sstables(std::vector<shared_sstable> sstables,
auto newtab = creator();
future<> write_done = newtab->write_components(
std::move(mutation_queue_reader), estimated_parititions, schema).then([newtab] {
return newtab->load();
return newtab->load().then([newtab] {});
});
// Wait for both read_done and write_done fibers to finish.