From b6aa9ca6747e21ed9dbbeb5a8eb9f5acbd18de8a Mon Sep 17 00:00:00 2001 From: myoungwon oh Date: Fri, 12 Jan 2018 13:58:02 +0900 Subject: [PATCH] osd: do not increase num_object if the object has manifest In the case of redirected and chunked object, base tier has metadata (same as existing object but, size is zero) so do not need to update num_object Signed-off-by: Myoungwon Oh --- src/osd/PrimaryLogPG.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 60b3e8c5ea6..7b2d771cef4 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -9276,7 +9276,9 @@ void PrimaryLogPG::finish_promote(int r, CopyResults *results, OpContextUPtr tctx = simple_opc_create(obc); tctx->at_version = get_next_version(); - ++tctx->delta_stats.num_objects; + if (!obc->obs.oi.has_manifest()) { + ++tctx->delta_stats.num_objects; + } if (soid.snap < CEPH_NOSNAP) ++tctx->delta_stats.num_object_clones; tctx->new_obs.exists = true;