From 2cd836a02e2d357d8d525a36c6fffab46ae199bb Mon Sep 17 00:00:00 2001 From: Vlad Zolotarov Date: Sun, 6 Mar 2016 17:26:31 +0200 Subject: [PATCH] api::set_storage_service(): fix the 'nodetool enablebackup' API 'nodetool enable/disablebackup' callback was modifying only the existing keyspaces and column families configurations. However new keyspaces/column families were using the original 'incremental_backups' configuration value which could be different from the value configured by 'nodetool enable/disablebackup' user command. This patch updates the database::_enable_incremental_backups per-shard value in addition to updating the existing keyspaces and column families configurations. Fixes #845 Signed-off-by: Vlad Zolotarov --- api/storage_service.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/storage_service.cc b/api/storage_service.cc index 2c5097ef3b..74ac261dc1 100644 --- a/api/storage_service.cc +++ b/api/storage_service.cc @@ -588,6 +588,8 @@ void set_storage_service(http_context& ctx, routes& r) { auto val_str = req->get_query_param("value"); bool value = (val_str == "True") || (val_str == "true") || (val_str == "1"); return service::get_local_storage_service().db().invoke_on_all([value] (database& db) { + db.set_enable_incremental_backups(value); + // Change both KS and CF, so they are in sync for (auto& pair: db.get_keyspaces()) { auto& ks = pair.second;