mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-02 04:56:58 +00:00
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>
This commit is contained in:
@@ -1952,7 +1952,7 @@ sstring storage_service::get_load_string() {
|
||||
}
|
||||
|
||||
future<std::map<sstring, double>> 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<sstring, double> load_map;
|
||||
auto& lb = ss.get_load_broadcaster();
|
||||
if (lb) {
|
||||
|
||||
Reference in New Issue
Block a user