Skip to content

Commit 5bbe5e8

Browse files
scottlashleydaverigby
authored andcommitted
MB-33463: Change calls to SyncCommitBatches to use config param
SyncCommitBatches is used to persist any pending batches of items to the WAL. In addition, it can also create a commit point when configuration calls for creating a commit point on every batch flush. This checkin is to make all calls to SyncCommitBatch use the configuration setting. This issue was exposed during testing when it was observed that kv_engine is calling snapshotVBucket quite frequently, especially in low DGM scenarios forcing the write cache out and thus creating tiny sstables which increased compaction frequency. Change-Id: I06b2e6adf3ae2ea3653ddb6a77f4afd5c4a79104 Reviewed-on: http://review.couchbase.org/114095 Reviewed-by: Jim Walker <[email protected]> Tested-by: Build Bot <[email protected]>
1 parent 50fa82a commit 5bbe5e8

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
@@ -1182,7 +1182,7 @@ bool MagmaKVStore::snapshotVBucket(Vbid vbid,
11821182
status.String());
11831183
return false;
11841184
}
1185-
status = magma->SyncCommitBatches(true);
1185+
status = magma->SyncCommitBatches(commitPointEveryBatch);
11861186
if (!status) {
11871187
logger->critical(
11881188
"MagmaKVStore::snapshotVBucket: "
@@ -2025,7 +2025,7 @@ bool MagmaKVStore::compactDB(compaction_ctx* ctx) {
20252025
vbid,
20262026
status.String());
20272027
} else {
2028-
status = magma->SyncCommitBatches(true);
2028+
status = magma->SyncCommitBatches(commitPointEveryBatch);
20292029
if (!status) {
20302030
logger->warn(
20312031
"MagmaKVStore::saveDocs: magma::SyncCommitBatches {} "

0 commit comments

Comments
 (0)