Skip to content

Commit

Permalink
MB-33463: Set vbid once for compaction context
Browse files Browse the repository at this point in the history
When the compaction callback is made, we only need to set the vbid once
rather than for each item. This reduces code path.

Change-Id: I2479521c36fee8c6e80b9a4669e1254c5788bde0
Reviewed-on: http://review.couchbase.org/112978
Reviewed-by: Dave Rigby <[email protected]>
Tested-by: Build Bot <[email protected]>
  • Loading branch information
scottlashley committed Aug 21, 2019
1 parent e39b54f commit f21b690
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engines/ep/src/magma-kvstore/magma-kvstore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,9 @@ bool MagmaKVStore::compactionCallBack(MagmaKVStore::MagmaCompactionCB& cbCtx,
logger->TRACE("MagmaCompactionCB {}", itemString.str());
}

cbCtx.vbid = getVbid(metaSlice);

if (!cbCtx.initialized) {
cbCtx.vbid = getVbid(metaSlice);

// If we have a compaction_ctx, that means we are doing an
// explicit compaction triggered by the kv_engine.
{
Expand Down

0 comments on commit f21b690

Please sign in to comment.