]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG::proc_replica_log: adjust oinfo.last_complete based on omissing
authorSamuel Just <sam.just@inktank.com>
Thu, 21 Feb 2013 23:31:36 +0000 (15:31 -0800)
committerSamuel Just <sam.just@inktank.com>
Wed, 20 Mar 2013 22:17:22 +0000 (15:17 -0700)
Otherwise, search_for_missing may neglect to check the missing
set for some objects assuming that if the need version is
prior to last_complete, the replica must have it.

Fixes: #4994
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit ce7ffc34408bf32c66dc07e6f42d54b7ec489d41)

src/osd/PG.cc

index 2f1d77cb60210ac681adb1f7275e890547dfed32..27080b5ac69e907b1252b370cf69226c030753b8 100644 (file)
@@ -270,6 +270,8 @@ void PG::proc_replica_log(ObjectStore::Transaction& t,
     oinfo.last_update = lu;
     if (lu < oinfo.last_complete)
       oinfo.last_complete = lu;
+    if (omissing.have_missing())
+      oinfo.last_complete = missing.missing[missing.rmissing.begin()->second].need;
   }
 
   peer_info[from] = oinfo;