]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG::issue_repop: only adjust peer_info last_updates if not temp 1469/head
authorSamuel Just <sam.just@inktank.com>
Fri, 14 Mar 2014 21:48:31 +0000 (14:48 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 14 Mar 2014 21:48:33 +0000 (14:48 -0700)
Temp object repops have version eversion_t() since they don't
actually send log entries.  Updating the last_updates here
caused the peer info last_updates to be incorrect until the
next non-temp repop.

Fixes: #7718
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index 33bea32a72e50d447ff87108a0cfd88ab86590ae..37f56510eaf38eb33ef090af424ffbbf81a99e28 100644 (file)
@@ -6393,16 +6393,17 @@ void ReplicatedPG::issue_repop(RepGather *repop, utime_t now)
           << dendl;
 
   repop->v = ctx->at_version;
-
-  for (set<pg_shard_t>::iterator i = actingbackfill.begin();
-       i != actingbackfill.end();
-       ++i) {
-    if (*i == get_primary()) continue;
-    pg_info_t &pinfo = peer_info[*i];
-    // keep peer_info up to date
-    if (pinfo.last_complete == pinfo.last_update)
-      pinfo.last_complete = ctx->at_version;
-    pinfo.last_update = ctx->at_version;
+  if (ctx->at_version > eversion_t()) {
+    for (set<pg_shard_t>::iterator i = actingbackfill.begin();
+        i != actingbackfill.end();
+        ++i) {
+      if (*i == get_primary()) continue;
+      pg_info_t &pinfo = peer_info[*i];
+      // keep peer_info up to date
+      if (pinfo.last_complete == pinfo.last_update)
+       pinfo.last_complete = ctx->at_version;
+      pinfo.last_update = ctx->at_version;
+    }
   }
 
   repop->obc->ondisk_write_lock();