]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: update primary's notion of peer last_update on activate
authorSage Weil <sage@newdream.net>
Thu, 25 Jun 2009 20:01:16 +0000 (13:01 -0700)
committerSage Weil <sage@newdream.net>
Thu, 25 Jun 2009 20:01:16 +0000 (13:01 -0700)
We are pushing the peer the log to bring it up to date, so
update our peer_info[peer].last_update to match.  Otherwise,
we get confused if we get, say, stray content and peer() is
called later, and we have out of date peer stats.

src/osd/PG.cc

index d96d0a74f38a402f2e63f7b50863b5cda5a3ddae..eb7aca406cda45b1b8152d21c18d02adee080ec0 100644 (file)
@@ -1432,6 +1432,9 @@ void PG::activate(ObjectStore::Transaction& t,
        osd->messenger->send_message(m, osd->osdmap->get_inst(peer));
       }
 
+      // peer now has 
+      pi.last_update = info.last_update;
+
       // update our missing
       if (pm.num_missing() == 0) {
        pi.last_complete = pi.last_update;