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>
// 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());
// 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();