From ce58be82d43dfcd9226fe432d6fb83f76a760160 Mon Sep 17 00:00:00 2001 From: Jim Walker Date: Fri, 2 Oct 2020 16:07:13 +0100 Subject: [PATCH] MB-41321: 3/4 removeDeletedDoc redundant collection item count adjustment During rollback's removeDeletedDoc function we read lock the manifest and decrement the collection's item count, yet at the end of rollback we throw away the manifest and create a new one using the rollback point, making the decrement (and read-locking) redundant. Change-Id: I1803d516c66841fd92ccefc843a62db9e17b2fe4 Reviewed-on: http://review.couchbase.org/c/kv_engine/+/137408 Tested-by: Build Bot Reviewed-by: Dave Rigby --- engines/ep/src/ep_bucket.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/engines/ep/src/ep_bucket.cc b/engines/ep/src/ep_bucket.cc index 525e52d427..571b4eab1e 100644 --- a/engines/ep/src/ep_bucket.cc +++ b/engines/ep/src/ep_bucket.cc @@ -1564,9 +1564,6 @@ class EPDiskRollbackCB : public RollbackCB { // Irrespective of if the in-memory delete succeeded; the document // doesn't exist on disk; so decrement the item count. vb.decrNumTotalItems(); - // @todo: investigate if this is needed. Once rollback is done we - // reset all collections stats from the rollback point - vb.getManifest().lock(item.getKey()).decrementItemCount(); } }