]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::finish_copyfrom: check new_obs.exists, not obs.exists
authorSamuel Just <sam.just@inktank.com>
Sat, 7 Dec 2013 23:10:26 +0000 (15:10 -0800)
committerSamuel Just <sam.just@inktank.com>
Wed, 22 Jan 2014 22:39:17 +0000 (14:39 -0800)
If the transaction previously created the object, the stat update
will have already happened.

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

index 4dc0ee4e8e9532c1f13edb572f11b102a5fb0e55..a4c4d2d4d11c392ff0eafe133f233d4e86a11704 100644 (file)
@@ -5432,7 +5432,7 @@ void ReplicatedPG::finish_copyfrom(OpContext *ctx)
     ctx->op_t->remove(obs.oi.soid);
   }
 
-  if (!ctx->obs->exists) {
+  if (!obs.exists) {
     ctx->delta_stats.num_objects++;
     obs.exists = true;
   }