That will be needed for aborting reshape on boot.
Refs #7738.
Signed-off-by: Raphael S. Carvalho <
raph...@scylladb.com>
---
api/api_init.hh | 1 +
api/api.cc | 9 ++++++++-
main.cc | 3 +++
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/api/api_init.hh b/api/api_init.hh
index ecba22f17..8dce1760a 100644
--- a/api/api_init.hh
+++ b/api/api_init.hh
@@ -86,6 +86,7 @@ future<> set_server_storage_proxy(http_context& ctx);
future<> set_server_stream_manager(http_context& ctx);
future<> set_server_gossip_settle(http_context& ctx);
future<> set_server_cache(http_context& ctx);
+future<> set_server_compaction_manager(http_context& ctx);
future<> set_server_done(http_context& ctx);
}
diff --git a/api/api.cc b/api/api.cc
index bef2a736e..523ada75e 100644
--- a/api/api.cc
+++ b/api/api.cc
@@ -178,13 +178,20 @@ future<> set_server_gossip_settle(http_context& ctx) {
});
}
-future<> set_server_done(http_context& ctx) {
+future<> set_server_compaction_manager(http_context& ctx) {
auto rb = std::make_shared < api_registry_builder > (ctx.api_doc);
return ctx.http_server.set_routes([rb, &ctx](routes& r) {
rb->register_function(r, "compaction_manager",
"The Compaction manager API");
set_compaction_manager(ctx, r);
+ });
+}
+
+future<> set_server_done(http_context& ctx) {
+ auto rb = std::make_shared < api_registry_builder > (ctx.api_doc);
+
+ return ctx.http_server.set_routes([rb, &ctx](routes& r) {
rb->register_function(r, "lsa", "Log-structured allocator API");
set_lsa(ctx, r);
diff --git a/main.cc b/main.cc
index 9c102639f..364b6292c 100644
--- a/main.cc
+++ b/main.cc
@@ -1029,6 +1029,9 @@ int main(int ac, char** av) {
distributed_loader::ensure_system_table_directories(db).get();
+ // making compaction manager api available, after system keyspace has already been established.
+ api::set_server_compaction_manager(ctx).get();
+
supervisor::notify("loading non-system sstables");
distributed_loader::init_non_system_keyspaces(db, proxy, mm).get();
--
2.31.1