]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: GetLog: don't fail if we get an outdated log
authorJosh Durgin <josh.durgin@dreamhost.com>
Wed, 18 May 2011 23:15:28 +0000 (16:15 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Thu, 19 May 2011 00:04:17 +0000 (17:04 -0700)
If we request a log from one osd, and then another member of our prior
set comes up with a later last_update, we should not fail when we
receive the first log.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/osd/PG.cc

index 933de6833b7f4f945c9db96a1144920324ef4d1a..a6cf5df522502d1628cce7c4c8b00c02610da1a3 100644 (file)
@@ -4423,7 +4423,11 @@ PG::RecoveryState::GetLog::GetLog(my_context ctx) :
 boost::statechart::result 
 PG::RecoveryState::GetLog::react(const MLogRec& logevt) {
   assert(!msg);
-  assert(logevt.from == newest_update_osd);
+  if (logevt.from != newest_update_osd) {
+    dout(10) << "GetLog: discarding log from "
+            << "non-newest_update_osd osd" << logevt.from << dendl;
+    return discard_event();
+  }
   dout(10) << "GetLog: recieved master log from osd" 
           << logevt.from << dendl;
   msg = logevt.msg;