]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: clear ReplicatedPG::object_contexts when PG start a new interval 2664/head
authorDong Yuan <yuandong1222@gmail.com>
Thu, 18 Dec 2014 12:08:21 +0000 (12:08 +0000)
committerDong Yuan <yuandong1222@gmail.com>
Thu, 18 Dec 2014 15:57:53 +0000 (15:57 +0000)
We call object_contexts.clear() in ReplicatedPG::on_change

Change-Id: I705c72378ebe2ccc424b070cd775329041932e75
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
src/osd/ReplicatedPG.cc

index 66bbaa687474edf9de385dad8fca5c3c38e17192..bee5b4112a97987e472311eb394343255b02a63c 100644 (file)
@@ -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.