From: Sage Weil Date: Wed, 16 Mar 2016 14:45:15 +0000 (-0400) Subject: osd/ReplicatedPG: clear watches on change after applying repops X-Git-Tag: v10.1.0~47^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0abff12a8367f9f252f5319ba16c59c637d0b178;p=ceph.git osd/ReplicatedPG: clear watches on change after applying repops apply_and_flush_repops does any in-flight request side-effects, including setting up new watches. Clear out watches after that so we don't leave any behind. Fixes: #15151 Signed-off-by: Sage Weil --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index d2fd6e9c6874e..eb673e2cf4ae1 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -10032,8 +10032,6 @@ void ReplicatedPG::on_change(ObjectStore::Transaction *t) // requeues waiting_for_active scrub_clear_state(); - context_registry_on_change(); - cancel_copy_ops(is_primary()); cancel_flush_ops(is_primary()); cancel_proxy_ops(is_primary()); @@ -10092,6 +10090,10 @@ void ReplicatedPG::on_change(ObjectStore::Transaction *t) // any dups apply_and_flush_repops(is_primary()); + // do this *after* apply_and_flush_repops so that we catch any newly + // registered watches. + context_registry_on_change(); + pgbackend->on_change_cleanup(t); scrubber.cleanup_store(t); pgbackend->on_change();