]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do not increase num_object if the object has manifest 19362/head
authormyoungwon oh <omwmw@sk.com>
Fri, 12 Jan 2018 04:58:02 +0000 (13:58 +0900)
committermyoungwon oh <omwmw@sk.com>
Fri, 12 Jan 2018 05:39:28 +0000 (14:39 +0900)
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 <omwmw@sk.com>
src/osd/PrimaryLogPG.cc

index 60b3e8c5ea6236cee36db852fcaf2ee33201f584..7b2d771cef456b251eda9f39390a1aeff5fdd00f 100644 (file)
@@ -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;