]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
osd/OSD: choose more heartbeat peers from different subtrees
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 3 Feb 2020 06:56:38 +0000 (14:56 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 3 Feb 2020 08:52:05 +0000 (16:52 +0800)
commit991354f17c061ef1a186e4858c6fb892128d4c6d
tree8e3538811ba8d99576df0fe2dda14069cae4eb76
parent29d850fb7ea69130f35ec1dca0d45dd07de5abd9
osd/OSD: choose more heartbeat peers from different subtrees

We want to avoid a situation like:
- host.A consists of OSDs from 0 to 10
- cut off network of host.A from the rest of the cluster
- osd.1 is marked down when enough votes have been
  collected by mon
- osd.1 re-selects osd.0,2,3,..., and two extra
  osds from two different hosts as heartbeat peers
- osd.1 has more than 1/3 heartbeat peers becoming pingable,
  e.g., because they belongs to the same host.A, and will
  try to mark itself as up again

which as a result may cause a longer client op latency now.
Fix by (always) trying to select as many heartbeat peers
from different subtrees as possible instead.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/OSD.cc