]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon: OSDMonitor: only share osdmap with up OSDs
authorJoao Eduardo Luis <joao.luis@inktank.com>
Sat, 12 Jan 2013 01:06:36 +0000 (01:06 +0000)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Sat, 12 Jan 2013 01:09:01 +0000 (01:09 +0000)
commit3610e72e4f9117af712f34a2e12c5e9537a5746f
treef7dd360e3c498cf16a48fd7bed7d48a83dc24c1f
parentaeb02061deb6d1073b1365df78ba3fde4d8e77aa
mon: OSDMonitor: only share osdmap with up OSDs

Try to share the map with a randomly picked OSD; if the picked monitor is
not 'up', then try to find the nearest 'up' OSD in the map by doing a
backward and a forward linear search on the map -- this would be O(n) in
the worst case scenario, as we only do a single iteration starting on the
picked position, incrementing and decrementing two different iterators
until we find an appropriate OSD or we exhaust the map.

Fixes: #3629
Backport: bobtail

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/mon/OSDMonitor.cc
src/mon/Session.h