diff --git a/api/system.cc b/api/system.cc index 58558356e6..66d004f3aa 100644 --- a/api/system.cc +++ b/api/system.cc @@ -10,7 +10,7 @@ #include "api/api-doc/system.json.hh" #include "api/api-doc/metrics.json.hh" #include "replica/database.hh" -#include "sstables/sstables_manager.hh" +#include "db/sstables-format-selector.hh" #include #include @@ -186,9 +186,10 @@ void set_system(http_context& ctx, routes& r) { } void set_format_selector(http_context& ctx, routes& r, db::sstables_format_selector& sel) { - hs::get_highest_supported_sstable_version.set(r, [&ctx] (const_req req) { - auto& table = ctx.db.local().find_column_family("system", "local"); - return seastar::to_sstring(table.get_sstables_manager().get_highest_supported_format()); + hs::get_highest_supported_sstable_version.set(r, [&sel] (std::unique_ptr req) { + return smp::submit_to(0, [&sel] { + return make_ready_future(seastar::to_sstring(sel.selected_format())); + }); }); }