From e36a99ef2303474284bd4d970fae257f70dfd124 Mon Sep 17 00:00:00 2001 From: Asias He Date: Mon, 29 Feb 2016 09:26:27 +0000 Subject: [PATCH] storage_service: Do not take api lock for get_load_map It is used by nodetool status If an api operation inside storage_service takes a long time to finish , which holds the lock, it will block nodetool status for a long time. I think it is safe to get the load map even if other operations are in-flight. Refs: #850 Message-Id: <1456737987-32353-2-git-send-email-asias@scylladb.com> --- service/storage_service.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/storage_service.cc b/service/storage_service.cc index fba110f375..7483e2283b 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -1952,7 +1952,7 @@ sstring storage_service::get_load_string() { } future> storage_service::get_load_map() { - return run_with_read_api_lock([] (storage_service& ss) { + return run_with_no_api_lock([] (storage_service& ss) { std::map load_map; auto& lb = ss.get_load_broadcaster(); if (lb) {