]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: populate_object_context during handle_pull_response
authorSamuel Just <samuel.just@dreamhost.com>
Fri, 16 Mar 2012 17:01:03 +0000 (10:01 -0700)
committerSamuel Just <samuel.just@dreamhost.com>
Fri, 16 Mar 2012 17:04:41 +0000 (10:04 -0700)
A cached objectcontext should always have its watchers populated.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/osd/ReplicatedPG.cc

index bee16773911a1bb618378083d4dccb74cbc3a8b8..f97947809164de584bb4cf2bcdbef051f57164ae 100644 (file)
@@ -4801,6 +4801,7 @@ void ReplicatedPG::handle_pull_response(OpRequest *op)
     obc->ondisk_write_lock();
     obc->obs.exists = true;
     obc->obs.oi = pi.recovery_info.oi;
+    populate_obc_watchers(obc);
 
     if (hoid.snap == CEPH_NOSNAP || hoid.snap == CEPH_SNAPDIR) {
       obc->ssc->snapset = pi.recovery_info.ss;
@@ -5164,8 +5165,6 @@ void ReplicatedPG::_applied_recovered_object(ObjectStore::Transaction *t, Object
 {
   lock();
   dout(10) << "_applied_recovered_object " << *obc << dendl;
-  if (is_primary())
-    populate_obc_watchers(obc);
   put_object_context(obc);
   unlock();
   delete t;