From 3ccbb28f2adbaa18060a1e291b7040b4cdebf5ec Mon Sep 17 00:00:00 2001 From: Benny Halevy Date: Tue, 27 Dec 2022 13:12:41 +0200 Subject: [PATCH] distributed_loader: process_upload_dir: pass owned_ranges_ptr to reshard To facilitate implicit cleanup of sstables via resharding. Refs #11933 Signed-off-by: Benny Halevy --- replica/distributed_loader.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/replica/distributed_loader.cc b/replica/distributed_loader.cc index 2fc8d92189..20f8577c93 100644 --- a/replica/distributed_loader.cc +++ b/replica/distributed_loader.cc @@ -459,9 +459,10 @@ distributed_loader::process_upload_dir(distributed& db, distr return sstables::generation_type(gen); }; + auto owned_ranges_ptr = compaction::make_owned_ranges_ptr(db.local().get_keyspace_local_ranges(ks)); reshard(directory, db, ks, cf, [&] (shard_id shard) mutable { return make_sstable(*global_table, upload, new_generation_for_shard(shard)); - }, service::get_local_streaming_priority()).get(); + }, service::get_local_streaming_priority(), owned_ranges_ptr).get(); reshape(directory, db, sstables::reshape_mode::strict, ks, cf, [&] (shard_id shard) { return make_sstable(*global_table, upload, new_generation_for_shard(shard));