Skip to content

Commit

Permalink
MB-41321: 3/4 removeDeletedDoc redundant collection item count adjust…
Browse files Browse the repository at this point in the history
…ment

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 <[email protected]>
Reviewed-by: Dave Rigby <[email protected]>
  • Loading branch information
jimwwalker committed Oct 12, 2020
1 parent 250d307 commit ce58be8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions engines/ep/src/ep_bucket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit ce58be8

Please sign in to comment.