From 623ebf02dd20dcaeca4bf5fb22b7ce59357b577a Mon Sep 17 00:00:00 2001 From: Dong Yuan Date: Thu, 18 Dec 2014 12:08:21 +0000 Subject: [PATCH] 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 --- src/osd/ReplicatedPG.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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. -- 2.47.3