From e8a08ffa5bfe0331aab9e3dbfdc3a2f41d564a3a Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Sat, 7 Dec 2013 15:10:26 -0800 Subject: [PATCH] ReplicatedPG::finish_copyfrom: check new_obs.exists, not obs.exists If the transaction previously created the object, the stat update will have already happened. Signed-off-by: Samuel Just --- src/osd/ReplicatedPG.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 4dc0ee4e8e953..a4c4d2d4d11c3 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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; } -- 2.39.5