]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: vary tick interval +/- 5% to avoid scrub livelocks 23512/head
authorSage Weil <sage@redhat.com>
Thu, 9 Aug 2018 13:33:42 +0000 (08:33 -0500)
committerSage Weil <sage@redhat.com>
Sun, 12 Aug 2018 20:43:40 +0000 (15:43 -0500)
commit2011377c379c9d53a3a0a693a7874fc330278898
tree7dcfd0013373a8cbdfc2741b9f6d11f4a8b6ea93
parent7d76458354661f7575c4a2cae251a9b828513580
osd: vary tick interval +/- 5% to avoid scrub livelocks

If you have two pgs that need to scrub on two OSDs, each the primary
for one pg and the replica for the other, you can end up in a livelock:

- both osds locally reserve a scrub slot
- both osds send a scrub schedule request
- both scrub requests are rejected
- both osds wait exactly 1 second
- repeat

Seems a bit unlikely, but I've seen test cases where it goes on more an
hour.

Fixes: http://tracker.ceph.com/issues/26890
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h