From 565bdb7ceb8db87ec5d950349a94efa04b55dca2 Mon Sep 17 00:00:00 2001 From: Trond Norbye Date: Tue, 15 Sep 2020 14:38:41 +0200 Subject: [PATCH] Remove visibility of CouchKVS::compactDBInternal All current needs may be fulfilled via the public compactDB method Change-Id: Icf8a7cd1572b870a6b53213b04bc3e4c5f7de544 Reviewed-on: http://review.couchbase.org/c/kv_engine/+/136286 Reviewed-by: Ben Huddleston Tested-by: Build Bot --- engines/ep/tests/mock/mock_couch_kvstore.h | 1 - engines/ep/tests/module_tests/couch-kvstore_test.cc | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/engines/ep/tests/mock/mock_couch_kvstore.h b/engines/ep/tests/mock/mock_couch_kvstore.h index e84187a53..961e9e278 100644 --- a/engines/ep/tests/mock/mock_couch_kvstore.h +++ b/engines/ep/tests/mock/mock_couch_kvstore.h @@ -64,7 +64,6 @@ class MockCouchKVStore : public CouchKVStore { dbFileRevMap) { } - using CouchKVStore::compactDBInternal; using CouchKVStore::setMb40415RegressionHook; /** diff --git a/engines/ep/tests/module_tests/couch-kvstore_test.cc b/engines/ep/tests/module_tests/couch-kvstore_test.cc index e7b745441..a9c007881 100644 --- a/engines/ep/tests/module_tests/couch-kvstore_test.cc +++ b/engines/ep/tests/module_tests/couch-kvstore_test.cc @@ -1561,12 +1561,12 @@ TEST_F(CouchstoreTest, testV2WriteRead) { // we wouldn't potentially get a database header without the _local/document TEST_F(CouchstoreTest, MB40415_regression_test) { CompactionConfig config; - compaction_ctx cctx(config, 0); + auto ctx = std::make_shared(config, 0); // Verify that if we would "fail" the precommit hook for some reason // the entire compaction would fail... kvstore->setMb40415RegressionHook(true); - EXPECT_FALSE(kvstore->compactDBInternal(&cctx, {})); + EXPECT_FALSE(kvstore->compactDB(ctx)); } class CouchKVStoreMetaData : public ::testing::Test {};