]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: clear watches on change after applying repops 8163/head
authorSage Weil <sage@redhat.com>
Wed, 16 Mar 2016 14:45:15 +0000 (10:45 -0400)
committerSage Weil <sage@redhat.com>
Wed, 16 Mar 2016 14:45:15 +0000 (10:45 -0400)
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 <sage@redhat.com>
src/osd/ReplicatedPG.cc

index d2fd6e9c6874e400870df5aa149de12ad6c08e89..eb673e2cf4ae1d6f1a04e1d6f7e565d8f8040ea9 100644 (file)
@@ -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();