]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: block write on degraded object if there are waiters 3911/head
authorSamuel Just <sjust@redhat.com>
Sat, 7 Mar 2015 02:02:25 +0000 (18:02 -0800)
committerSamuel Just <sjust@redhat.com>
Sat, 7 Mar 2015 02:02:25 +0000 (18:02 -0800)
Suppose we have min_size of 2 and size of 3, foo exists only on the
primary.
- block op 1 on foo due to < min_size
- start recovery on foo for replicas 1 and 2
- complete push to replica 1 (2 copies now)
- allow op 2 on foo through since we have 2 copies
- complete recovery on foo, requeue op 1

Fixes: 11057
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ReplicatedPG.cc

index aebcbf75245c235ffcd0e08458a153e3db6588a6..057564c37a1d6b2f6a5ed734b486702a290ce02d 100644 (file)
@@ -1487,6 +1487,7 @@ void ReplicatedPG::do_op(OpRequestRef& op)
   if (write_ordered &&
       is_degraded_object(head, &valid_copies) &&
       (valid_copies < pool.info.min_size ||
+       waiting_for_degraded_object.count(head) ||
        pool.info.ec_pool() ||
        !cct->_conf->osd_enable_degraded_writes ||
        !(get_min_peer_features() & CEPH_FEATURE_OSD_DEGRADED_WRITES))) {