From 24589cf00cf8f1fae0b19a2ac1bd7b637061301a Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 17 Sep 2024 18:19:42 +0300 Subject: [PATCH 1/8] table: snapshot_on_all_shards: Get directory from storage options There are several things that are changed here - The target directory for snapshot is evaluated using table directory taken from its storage options, not from config - If the storage options are not "local", the snapshot_on_all_shards is failed early, it's impossible to snapshot sstables anyway - If the storage is not configured for the obtained local options, snapshotting is skilled, because it's a virtual table that's probably not supposed to have snapshots - The late failure to snapshot non-local sstables is converted into internal error, as this functionality cannot be executed as per previous change - The target path is created using fs::path operator/ overload, not by concatenating strings (it's minor change) Signed-off-by: Pavel Emelyanov --- replica/table.cc | 10 +++++++++- sstables/storage.cc | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/replica/table.cc b/replica/table.cc index 1c2dff89f0..6cfe774c70 100644 --- a/replica/table.cc +++ b/replica/table.cc @@ -2595,7 +2595,15 @@ future<> table::write_schema_as_cql(database& db, sstring dir) const { // Runs the orchestration code on an arbitrary shard to balance the load. future<> table::snapshot_on_all_shards(sharded& sharded_db, const global_table_ptr& table_shards, sstring name) { - auto jsondir = table_shards->_config.datadir + "/snapshots/" + name; + auto* so = std::get_if(&table_shards->get_storage_options().value); + if (so == nullptr) { + throw std::runtime_error("Snapshotting non-local tables is not implemented"); + } + if (so->dir.empty()) { // virtual tables don't have initialized local storage + co_return; + } + + auto jsondir = (so->dir / sstables::snapshots_dir / name).native(); auto orchestrator = std::hash()(jsondir) % smp::count; co_await smp::submit_to(orchestrator, [&] () -> future<> { diff --git a/sstables/storage.cc b/sstables/storage.cc index b893f5e9cf..b7e5839fc8 100644 --- a/sstables/storage.cc +++ b/sstables/storage.cc @@ -643,7 +643,8 @@ future<> s3_storage::remove_by_registry_entry(entry_descriptor desc) { } future<> s3_storage::snapshot(const sstable& sst, sstring dir, absolute_path abs, std::optional gen) const { - co_await coroutine::return_exception(std::runtime_error("Snapshotting S3 objects not implemented")); + on_internal_error(sstlog, "Snapshotting S3 objects not implemented"); + co_return; } std::unique_ptr make_storage(sstables_manager& manager, const data_dictionary::storage_options& s_opts, sstable_state state) { From a734fd5c9cf254fb63180482875808be2bd77dbc Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 17 Sep 2024 18:25:13 +0300 Subject: [PATCH 2/8] table: snapshot_exists: Get directory from storage options Similarly to snapshot_on_all_shards, the way snapshot directory is evaluated is changed to rely on storage options. Two ... assumptions are that when asking for non-local snapshot existance or for a snapshot of a virtual table, it's correct to return false instead of throwing. Signed-off-by: Pavel Emelyanov --- replica/table.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/replica/table.cc b/replica/table.cc index 6cfe774c70..4dd882af29 100644 --- a/replica/table.cc +++ b/replica/table.cc @@ -2663,7 +2663,12 @@ future<> table::finalize_snapshot(database& db, sstring jsondir, std::vector table::snapshot_exists(sstring tag) { - sstring jsondir = _config.datadir + "/snapshots/" + tag; + auto* so = std::get_if(&_storage_opts->value); + if (so == nullptr || so->dir.empty()) { + co_return false; // Technically it doesn't as snapshots only work for local storage + } + + sstring jsondir = (so->dir / sstables::snapshots_dir / tag).native(); bool exists = false; try { auto sd = co_await io_check(file_stat, jsondir, follow_symlink::no); From d9ef9bdd3bc5ccdfcedd9da619e581db8508a0d2 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 17 Sep 2024 18:59:10 +0300 Subject: [PATCH 3/8] tests: Add helper to get snapshot directory from storage options There's a bunch of tests that check the contents of snapshot directory after creating one. Add a helper for those that gets this directory via storage options, not table config. Signed-off-by: Pavel Emelyanov --- test/boost/database_test.cc | 40 +++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/test/boost/database_test.cc b/test/boost/database_test.cc index 71b0ac54fc..a78b92421e 100644 --- a/test/boost/database_test.cc +++ b/test/boost/database_test.cc @@ -576,6 +576,12 @@ future<> take_snapshot(cql_test_env& e, sstring ks_name, sstring cf_name, sstrin return take_snapshot(e.db(), false /* skip_flush */, std::move(ks_name), std::move(cf_name), std::move(snapshot_name)); } +// Helper to get directory a table keeps its data in. +// Only suitable for tests, that work with local storage type. +fs::path table_dir(const replica::column_family& cf) { + return std::get(cf.get_storage_options().value).dir; +} + SEASTAR_TEST_CASE(snapshot_works) { return do_with_some_data({"cf"}, [] (cql_test_env& e) { take_snapshot(e).get(); @@ -585,7 +591,7 @@ SEASTAR_TEST_CASE(snapshot_works) { }; auto& cf = e.local_db().find_column_family("ks", "cf"); - lister::scan_dir(fs::path(cf.dir()), lister::dir_entry_types::of(), [&expected] (fs::path parent_dir, directory_entry de) { + lister::scan_dir(table_dir(cf), lister::dir_entry_types::of(), [&expected] (fs::path parent_dir, directory_entry de) { expected.insert(de.name); return make_ready_future<>(); }).get(); @@ -593,7 +599,7 @@ SEASTAR_TEST_CASE(snapshot_works) { BOOST_REQUIRE_GT(expected.size(), 1); // all files were copied and manifest was generated - lister::scan_dir((fs::path(cf.dir()) / sstables::snapshots_dir / "test"), lister::dir_entry_types::of(), [&expected] (fs::path parent_dir, directory_entry de) { + lister::scan_dir((table_dir(cf) / sstables::snapshots_dir / "test"), lister::dir_entry_types::of(), [&expected] (fs::path parent_dir, directory_entry de) { expected.erase(de.name); return make_ready_future<>(); }).get(); @@ -612,7 +618,7 @@ SEASTAR_TEST_CASE(snapshot_skip_flush_works) { }; auto& cf = e.local_db().find_column_family("ks", "cf"); - lister::scan_dir(fs::path(cf.dir()), lister::dir_entry_types::of(), [&expected] (fs::path parent_dir, directory_entry de) { + lister::scan_dir(table_dir(cf), lister::dir_entry_types::of(), [&expected] (fs::path parent_dir, directory_entry de) { expected.insert(de.name); return make_ready_future<>(); }).get(); @@ -621,7 +627,7 @@ SEASTAR_TEST_CASE(snapshot_skip_flush_works) { BOOST_REQUIRE_EQUAL(expected.size(), 1); // all files were copied and manifest was generated - lister::scan_dir((fs::path(cf.dir()) / sstables::snapshots_dir / "test"), lister::dir_entry_types::of(), [&expected] (fs::path parent_dir, directory_entry de) { + lister::scan_dir((table_dir(cf) / sstables::snapshots_dir / "test"), lister::dir_entry_types::of(), [&expected] (fs::path parent_dir, directory_entry de) { expected.erase(de.name); return make_ready_future<>(); }).get(); @@ -643,7 +649,7 @@ SEASTAR_TEST_CASE(snapshot_list_okay) { BOOST_REQUIRE_EQUAL(sd.live, 0); BOOST_REQUIRE_GT(sd.total, 0); - lister::scan_dir(fs::path(cf.dir()), lister::dir_entry_types::of(), [] (fs::path parent_dir, directory_entry de) { + lister::scan_dir(table_dir(cf), lister::dir_entry_types::of(), [] (fs::path parent_dir, directory_entry de) { fs::remove(parent_dir / de.name); return make_ready_future<>(); }).get(); @@ -714,7 +720,7 @@ SEASTAR_TEST_CASE(clear_snapshot) { auto& cf = e.local_db().find_column_family("ks", "cf"); unsigned count = 0; - lister::scan_dir((fs::path(cf.dir()) / sstables::snapshots_dir / "test"), lister::dir_entry_types::of(), [&count] (fs::path parent_dir, directory_entry de) { + lister::scan_dir((table_dir(cf) / sstables::snapshots_dir / "test"), lister::dir_entry_types::of(), [&count] (fs::path parent_dir, directory_entry de) { count++; return make_ready_future<>(); }).get(); @@ -723,7 +729,7 @@ SEASTAR_TEST_CASE(clear_snapshot) { e.local_db().clear_snapshot("test", {"ks"}, "").get(); count = 0; - BOOST_REQUIRE_EQUAL(fs::exists(fs::path(cf.dir()) / sstables::snapshots_dir / "test"), false); + BOOST_REQUIRE_EQUAL(fs::exists(table_dir(cf) / sstables::snapshots_dir / "test"), false); return make_ready_future<>(); }); } @@ -739,8 +745,8 @@ SEASTAR_TEST_CASE(clear_multiple_snapshots) { co_await do_with_some_data({table_name}, [&] (cql_test_env& e) { auto& t = e.local_db().find_column_family(ks_name, table_name); - auto table_dir = fs::path(t.dir()); - auto snapshots_dir = table_dir / sstables::snapshots_dir; + auto tdir = table_dir(t); + auto snapshots_dir = tdir / sstables::snapshots_dir; for (auto i = 0; i < num_snapshots; i++) { testlog.debug("Taking snapshot {} on {}.{}", snapshot_name(i), ks_name, table_name); @@ -791,11 +797,11 @@ SEASTAR_TEST_CASE(clear_multiple_snapshots) { testlog.debug("Clearing all snapshots in {}.{} after it had been dropped", ks_name, table_name); e.local_db().clear_snapshot("", {ks_name}, table_name).get(); - SCYLLA_ASSERT(!fs::exists(table_dir)); + SCYLLA_ASSERT(!fs::exists(tdir)); // after all snapshots had been cleared, // the dropped table directory is expected to be removed. - BOOST_REQUIRE_EQUAL(fs::exists(table_dir), false); + BOOST_REQUIRE_EQUAL(fs::exists(tdir), false); return make_ready_future<>(); }); @@ -836,7 +842,7 @@ SEASTAR_TEST_CASE(test_snapshot_ctl_details) { BOOST_REQUIRE_EQUAL(sc_sd.details.live, sd.live); BOOST_REQUIRE_EQUAL(sc_sd.details.total, sd.total); - lister::scan_dir(fs::path(cf.dir()), lister::dir_entry_types::of(), [] (fs::path parent_dir, directory_entry de) { + lister::scan_dir(table_dir(cf), lister::dir_entry_types::of(), [] (fs::path parent_dir, directory_entry de) { fs::remove(parent_dir / de.name); return make_ready_future<>(); }).get(); @@ -878,7 +884,7 @@ SEASTAR_TEST_CASE(test_snapshot_ctl_true_snapshots_size) { auto sc_live_size = sc.local().true_snapshots_size().get(); BOOST_REQUIRE_EQUAL(sc_live_size, sd.live); - lister::scan_dir(fs::path(cf.dir()), lister::dir_entry_types::of(), [] (fs::path parent_dir, directory_entry de) { + lister::scan_dir(table_dir(cf), lister::dir_entry_types::of(), [] (fs::path parent_dir, directory_entry de) { fs::remove(parent_dir / de.name); return make_ready_future<>(); }).get(); @@ -1334,7 +1340,7 @@ SEASTAR_TEST_CASE(snapshot_with_quarantine_works) { auto& cf = db.local().find_column_family("ks", "cf"); // all files were copied and manifest was generated - co_await lister::scan_dir((fs::path(cf.dir()) / sstables::snapshots_dir / "test"), lister::dir_entry_types::of(), [&expected] (fs::path parent_dir, directory_entry de) { + co_await lister::scan_dir((table_dir(cf) / sstables::snapshots_dir / "test"), lister::dir_entry_types::of(), [&expected] (fs::path parent_dir, directory_entry de) { testlog.debug("Found in snapshots: {}", de.name); expected.erase(de.name); return make_ready_future<>(); @@ -1388,7 +1394,7 @@ static future<> test_drop_table_with_auto_snapshot(bool auto_snapshot) { db_cfg_ptr->auto_snapshot(auto_snapshot); co_await do_with_some_data({table_name}, [&] (cql_test_env& e) -> future<> { - auto cf_dir = e.local_db().find_column_family(ks_name, table_name).dir(); + auto cf_dir = table_dir(e.local_db().find_column_family(ks_name, table_name)).native(); // Pass `with_snapshot=true` to drop_table_on_all // to allow auto_snapshot (based on the configuration above). @@ -1413,7 +1419,7 @@ SEASTAR_TEST_CASE(drop_table_with_no_snapshot) { sstring table_name = "table_with_no_snapshot"; co_await do_with_some_data({table_name}, [&] (cql_test_env& e) -> future<> { - auto cf_dir = e.local_db().find_column_family(ks_name, table_name).dir(); + auto cf_dir = table_dir(e.local_db().find_column_family(ks_name, table_name)).native(); // Pass `with_snapshot=false` to drop_table_on_all // to disallow auto_snapshot. @@ -1432,7 +1438,7 @@ SEASTAR_TEST_CASE(drop_table_with_explicit_snapshot) { co_await do_with_some_data({table_name}, [&] (cql_test_env& e) -> future<> { auto snapshot_tag = format("test-{}", db_clock::now().time_since_epoch().count()); co_await replica::database::snapshot_table_on_all_shards(e.db(), ks_name, table_name, snapshot_tag, db::snapshot_ctl::snap_views::no, false); - auto cf_dir = e.local_db().find_column_family(ks_name, table_name).dir(); + auto cf_dir = table_dir(e.local_db().find_column_family(ks_name, table_name)).native(); // With explicit snapshot and with_snapshot=false // dir should still be kept, regardless of the From eaad4f348bc977955f465c8c958bac7b272c0268 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 17 Sep 2024 19:02:25 +0300 Subject: [PATCH 4/8] test: Generalize pair of make_table_for_tests helpers They only differ in a way they get target directory from -- one via argument, andother from test_env. Respectively, the latter can call the former. Signed-off-by: Pavel Emelyanov --- test/lib/test_services.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/lib/test_services.cc b/test/lib/test_services.cc index dcb088242d..c98347b1d3 100644 --- a/test/lib/test_services.cc +++ b/test/lib/test_services.cc @@ -492,11 +492,7 @@ test_env::make_table_for_tests(schema_ptr s, sstring dir) { table_for_tests test_env::make_table_for_tests(schema_ptr s) { - maybe_start_compaction_manager(); - auto cfg = make_table_config(); - cfg.datadir = _impl->dir.path().native(); - cfg.enable_commitlog = false; - return table_for_tests(manager(), _impl->cmgr->get_compaction_manager(), s, std::move(cfg), _impl->storage); + return make_table_for_tests(std::move(s), _impl->dir.path().native()); } void test_env::request_abort() { From 5046cfab4b4f0fe0fb0b502d4747e943dc7c677b Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 17 Sep 2024 19:05:17 +0300 Subject: [PATCH 5/8] test: Construct table_for_tests with table storage options The only place that constructs table_for_tests is make_table_for_tests helper. It can and should prepare the correct storage options, because that's the last place where the target directory is still known. Signed-off-by: Pavel Emelyanov --- test/lib/test_services.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/lib/test_services.cc b/test/lib/test_services.cc index c98347b1d3..3604b531b1 100644 --- a/test/lib/test_services.cc +++ b/test/lib/test_services.cc @@ -137,12 +137,6 @@ schema_ptr table_for_tests::make_default_schema() { table_for_tests::table_for_tests(sstables::sstables_manager& sstables_manager, compaction_manager& cm, schema_ptr s, replica::table::config cfg, data_dictionary::storage_options storage) : _data(make_lw_shared()) { - // FIXME -- the storage options here are from sstables::test_env that should have - // initialized it properly - std::visit(overloaded_functor { - [&cfg] (data_dictionary::storage_options::local& o) { o.dir = cfg.datadir; }, - [&cfg] (data_dictionary::storage_options::s3& o) { o.prefix = cfg.datadir; }, - }, storage.value); cfg.cf_stats = &_data->cf_stats; _data->s = s ? s : make_default_schema(); _data->cf = make_lw_shared(_data->s, std::move(cfg), make_lw_shared(storage), cm, sstables_manager, _data->cl_stats, sstables_manager.get_cache_tracker(), nullptr); @@ -487,7 +481,12 @@ test_env::make_table_for_tests(schema_ptr s, sstring dir) { auto cfg = make_table_config(); cfg.datadir = dir; cfg.enable_commitlog = false; - return table_for_tests(manager(), _impl->cmgr->get_compaction_manager(), s, std::move(cfg), _impl->storage); + auto storage = _impl->storage; + std::visit(overloaded_functor { + [&dir] (data_dictionary::storage_options::local& o) { o.dir = dir; }, + [&dir] (data_dictionary::storage_options::s3& o) { o.prefix = dir; }, + }, storage.value); + return table_for_tests(manager(), _impl->cmgr->get_compaction_manager(), s, std::move(cfg), std::move(storage)); } table_for_tests From b2fcfdcaa9cc176d72d3fb646853433544d85f52 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 17 Sep 2024 19:19:08 +0300 Subject: [PATCH 6/8] data_dictionary: Add formatter for storage_options Signed-off-by: Pavel Emelyanov --- data_dictionary/data_dictionary.cc | 11 +++++++++++ data_dictionary/storage_options.hh | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/data_dictionary/data_dictionary.cc b/data_dictionary/data_dictionary.cc index f81629c3fe..673b6cb9f5 100644 --- a/data_dictionary/data_dictionary.cc +++ b/data_dictionary/data_dictionary.cc @@ -399,3 +399,14 @@ auto fmt::formatter::format(const data_dicti } return fmt::format_to(ctx.out(), ", userTypes={}}}", m.user_types()); } + +auto fmt::formatter::format(const data_dictionary::storage_options& so, fmt::format_context& ctx) const -> decltype(ctx.out()) { + return std::visit(overloaded_functor { + [&ctx] (const data_dictionary::storage_options::local& so) -> decltype(ctx.out()) { + return fmt::format_to(ctx.out(), "{}", so.dir); + }, + [&ctx] (const data_dictionary::storage_options::s3& so) -> decltype(ctx.out()) { + return fmt::format_to(ctx.out(), "s3://{}/{}", so.bucket, so.prefix); + } + }, so.value); +} diff --git a/data_dictionary/storage_options.hh b/data_dictionary/storage_options.hh index 67bd99a92f..460c55da62 100644 --- a/data_dictionary/storage_options.hh +++ b/data_dictionary/storage_options.hh @@ -56,3 +56,9 @@ inline storage_options make_local_options(std::filesystem::path dir) { } } // namespace data_dictionary + +template <> +struct fmt::formatter { + constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } + auto format(const data_dictionary::storage_options&, fmt::format_context& ctx) const -> decltype(ctx.out()); +}; From 350f64c38b3cbe61b9c07ac94429bd10b0effd94 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 18 Sep 2024 12:56:15 +0300 Subject: [PATCH 7/8] distributed_loader: Print storage options, not datadir When populating keyspace on boot the dist. loader prints a debugging message with ks:cf names, state and the directory from where it picks sstables. The last one is not extremely correct, as loading sstables from S3 happens from a bucket, not directory. So it's better to print the storage options, not the datadir string. Signed-off-by: Pavel Emelyanov --- replica/distributed_loader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/replica/distributed_loader.cc b/replica/distributed_loader.cc index 726dd9c5a6..3fc006391b 100644 --- a/replica/distributed_loader.cc +++ b/replica/distributed_loader.cc @@ -367,7 +367,7 @@ sstables::shared_sstable make_sstable(replica::table& table, sstables::sstable_s } future<> table_populator::populate_subdir(sstables::sstable_state state, allow_offstrategy_compaction do_allow_offstrategy_compaction) { - dblog.debug("Populating {}/{}/{} state={} allow_offstrategy_compaction={}", _ks, _cf, _global_table->dir(), state, do_allow_offstrategy_compaction); + dblog.debug("Populating {}/{}/{} state={} allow_offstrategy_compaction={}", _ks, _cf, _global_table->get_storage_options(), state, do_allow_offstrategy_compaction); if (!_sstable_directories.contains(state)) { co_return; From 8487f2fd93bb9f7d11f48899c094f163edfa455f Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 17 Sep 2024 21:23:55 +0300 Subject: [PATCH 8/8] treewide: Remove table::config::datadir It's write-only now, all the places than wanted to know where table's storage is, already use storage_options. Signed-off-by: Pavel Emelyanov --- replica/database.cc | 1 - replica/database.hh | 5 ----- test/boost/mutation_test.cc | 3 +-- test/lib/test_services.cc | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/replica/database.cc b/replica/database.cc index ebd59aaf9c..9066802f7c 100644 --- a/replica/database.cc +++ b/replica/database.cc @@ -1222,7 +1222,6 @@ keyspace::make_column_family_config(const schema& s, const database& db) const { for (auto& extra : db_config.data_file_directories()) { cfg.all_datadirs.push_back(format("{}/{}/{}", extra, s.ks_name(), format_table_directory_name(s.cf_name(), s.id()))); } - cfg.datadir = cfg.all_datadirs[0]; cfg.enable_disk_reads = _config.enable_disk_reads; cfg.enable_disk_writes = _config.enable_disk_writes; cfg.enable_commitlog = _config.enable_commitlog; diff --git a/replica/database.hh b/replica/database.hh index 4080c45f39..9c71b71dd4 100644 --- a/replica/database.hh +++ b/replica/database.hh @@ -395,7 +395,6 @@ class table : public enable_lw_shared_from_this public: struct config { std::vector all_datadirs; - sstring datadir; bool enable_disk_writes = true; bool enable_disk_reads = true; bool enable_cache = true; @@ -687,10 +686,6 @@ private: mutation_reader::forwarding fwd_mr, std::function reserve_fn) const; public: - sstring dir() const { - return _config.datadir; - } - const storage_options& get_storage_options() const noexcept { return *_storage_opts; } lw_shared_ptr get_storage_options_ptr() const noexcept { return _storage_opts; } future<> init_storage(); diff --git a/test/boost/mutation_test.cc b/test/boost/mutation_test.cc index ae18e462c1..bb0d0e9141 100644 --- a/test/boost/mutation_test.cc +++ b/test/boost/mutation_test.cc @@ -103,12 +103,11 @@ with_column_family(schema_ptr s, replica::column_family::config cfg, sstables::s for (auto x_log2_compaction_groups : x_log2_compaction_group_values) { auto tracker = make_lw_shared(); auto dir = tmpdir(); - cfg.datadir = dir.path().string(); cfg.x_log2_compaction_groups = x_log2_compaction_groups; tasks::task_manager tm; auto cm = make_lw_shared(tm, compaction_manager::for_testing_tag{}); auto cl_stats = make_lw_shared(); - auto s_opts = make_lw_shared(data_dictionary::make_local_options(fs::path(cfg.datadir))); + auto s_opts = make_lw_shared(data_dictionary::make_local_options(dir.path())); auto cf = make_lw_shared(s, cfg, s_opts, *cm, sm, *cl_stats, *tracker, nullptr); cf->mark_ready_for_writes(nullptr); co_await func(*cf); diff --git a/test/lib/test_services.cc b/test/lib/test_services.cc index 3604b531b1..6a22d3fc39 100644 --- a/test/lib/test_services.cc +++ b/test/lib/test_services.cc @@ -479,7 +479,6 @@ table_for_tests test_env::make_table_for_tests(schema_ptr s, sstring dir) { maybe_start_compaction_manager(); auto cfg = make_table_config(); - cfg.datadir = dir; cfg.enable_commitlog = false; auto storage = _impl->storage; std::visit(overloaded_functor {