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 <omwmw@sk.com>
This commit is contained in:
myoungwon oh 2018-01-12 13:58:02 +09:00
parent 02c223273d
commit b6aa9ca674

View 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;