Skip to content

Commit f21b690

Browse files
committed
MB-33463: Set vbid once for compaction context
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]>
1 parent e39b54f commit f21b690

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engines/ep/src/magma-kvstore/magma-kvstore.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,9 @@ bool MagmaKVStore::compactionCallBack(MagmaKVStore::MagmaCompactionCB& cbCtx,
377377
logger->TRACE("MagmaCompactionCB {}", itemString.str());
378378
}
379379

380-
cbCtx.vbid = getVbid(metaSlice);
381-
382380
if (!cbCtx.initialized) {
381+
cbCtx.vbid = getVbid(metaSlice);
382+
383383
// If we have a compaction_ctx, that means we are doing an
384384
// explicit compaction triggered by the kv_engine.
385385
{

0 commit comments

Comments
 (0)