X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fosd%2FPrimaryLogPG.cc;h=f02e12636e4088f2af64dc2df18367bf320630a2;hb=f6b5b4d738b87d88d2de35127b6b0e41eae2a272;hp=a16ba09eb22d18d63f79b67856d52937c116c071;hpb=12732ca2e80d168d344a265acffc1fbd1fa1f1b5;p=ceph.git diff --git a/ceph/src/osd/PrimaryLogPG.cc b/ceph/src/osd/PrimaryLogPG.cc index a16ba09eb..f02e12636 100644 --- a/ceph/src/osd/PrimaryLogPG.cc +++ b/ceph/src/osd/PrimaryLogPG.cc @@ -10868,7 +10868,7 @@ void PrimaryLogPG::check_blacklisted_obc_watchers(ObjectContextRef obc) void PrimaryLogPG::populate_obc_watchers(ObjectContextRef obc) { - ceph_assert(is_active()); + ceph_assert(is_primary() && is_active()); auto it_objects = recovery_state.get_pg_log().get_log().objects.find(obc->obs.oi.soid); ceph_assert((recovering.count(obc->obs.oi.soid) || !is_missing_object(obc->obs.oi.soid)) || @@ -11062,7 +11062,7 @@ ObjectContextRef PrimaryLogPG::get_object_context( soid, true, soid.has_snapset() ? attrs : 0); - if (is_active()) + if (is_primary() && is_active()) populate_obc_watchers(obc); if (pool.info.is_erasure()) {