]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: close split vs query race in consume_map
authorSage Weil <sage@redhat.com>
Fri, 23 Feb 2018 19:39:40 +0000 (13:39 -0600)
committerSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 13:26:57 +0000 (08:26 -0500)
commitce699ff8701a46974f09fd1512e1fe61abb1a5a7
tree084d340c1366204e618480836be4185d4b24152f
parentb4d96be92dc09fc65ea09059c294110cdccf7837
osd: close split vs query race in consume_map

Consider the race:

- shard 0 consumes epoch E
- shard 1 consumes epoch E
  - shard 1 pg P will split to C
- shard 0 processes query on C, returns DNE
- shard 0 primes slot C

Close race by priming split children before consuming map into each
OSDShard.  That way the query will either (1) arrive before E and before
slot C is primed and wait for E, or find the slot present with
waiting_for_split true.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h