From: Dong Yuan Date: Thu, 18 Dec 2014 12:08:21 +0000 (+0000) Subject: osd: clear ReplicatedPG::object_contexts when PG start a new interval X-Git-Tag: v0.93~163^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=623ebf02dd20dcaeca4bf5fb22b7ce59357b577a;p=ceph.git osd: clear ReplicatedPG::object_contexts when PG start a new interval We call object_contexts.clear() in ReplicatedPG::on_change Change-Id: I705c72378ebe2ccc424b070cd775329041932e75 Signed-off-by: Dong Yuan --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 66bbaa68747..bee5b4112a9 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -9865,9 +9865,11 @@ void ReplicatedPG::on_change(ObjectStore::Transaction *t) hit_set_clear(); } + // we don't trust the object_contexts cache anymore + object_contexts.clear(); + // requeue everything in the reverse order they should be // reexamined. - clear_scrub_reserved(); scrub_clear_state(); @@ -9955,9 +9957,6 @@ void ReplicatedPG::on_pool_change() } hit_set_setup(); agent_setup(); - if (get_role() !=0) { - object_contexts.clear(); - } } // clear state. called on recovery completion AND cancellation.