]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd : populate the needs_recovery_map source fast when only one peer has missing 3919/head
authorGuang Yang <yguang@yahoo-inc.com>
Tue, 10 Mar 2015 07:06:09 +0000 (07:06 +0000)
committerGuang Yang <yguang@yahoo-inc.com>
Fri, 10 Apr 2015 06:03:59 +0000 (06:03 +0000)
commit12f564509b951c9c8134c21d09a12f0c06ac95c8
tree81c05a83ec49c6e571ac4f249c390bff4ea5beb6
parenta19f92cfa64741fb801d0e814dd712ab52d4d221
osd : populate the needs_recovery_map source fast when only one peer has missing

The most common case for peering, is that one OSD/host get down for some time, and
the OSD(s) are still in. Once bring them up again, the primary OSD need to populate
the recovery map and add the recovery source. If there are N replicas, M missing objects,
the current complexity of the routine is N*M*logN.

This patch detects if there is only one peers has missing, it goes through a fast routine
add populate the map with complexity of N*logN.

Fixes: 9558
Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
src/osd/PG.cc
src/osd/PG.h