]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr: optimize DaemonStateIndex::cull() a little bit 14967/head
authorKefu Chai <kchai@redhat.com>
Fri, 5 May 2017 07:39:39 +0000 (15:39 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 5 May 2017 07:51:46 +0000 (15:51 +0800)
commit0e7137aa6a1f1d9f6d1276acc2cd89f5787ecce3
treed3493a5bc25d8c420cf2179136f6d71a30621f92
parent77a43573ab89ae3e50cfd1acf548c266d12e90f4
mgr: optimize DaemonStateIndex::cull() a little bit

if the size of the cluster is quite large, we don't need to walk through
all daemons to do the cull.

* smaller scope protected by the lock
* check smaller range in "all"
* use vector<string> for holding victims: all of them are of
  "daemon_type".

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mgr/DaemonState.cc
src/mgr/DaemonState.h