diff options
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r-- | src/mongo/db/repl/applier_helpers.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/sync_tail.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/sync_tail_test.cpp | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/mongo/db/repl/applier_helpers.cpp b/src/mongo/db/repl/applier_helpers.cpp index ec8633cf6bb..8ecd76ffa30 100644 --- a/src/mongo/db/repl/applier_helpers.cpp +++ b/src/mongo/db/repl/applier_helpers.cpp @@ -38,7 +38,7 @@ #include <iterator> #include "mongo/bson/bsonobjbuilder.h" -#include "mongo/db/query/query_knobs.h" +#include "mongo/db/ops/write_ops.h" #include "mongo/db/repl/oplog_entry.h" #include "mongo/db/repl/sync_tail.h" #include "mongo/util/assert_util.h" @@ -50,7 +50,7 @@ namespace repl { namespace { // Must not create too large an object. -const auto kInsertGroupMaxBatchSize = insertVectorMaxBytes; +const auto kInsertGroupMaxBatchSize = write_ops::insertVectorMaxBytes; // Limit number of ops in a single group. constexpr auto kInsertGroupMaxBatchCount = 64; @@ -99,7 +99,7 @@ StatusWith<InsertGroup::ConstIterator> InsertGroup::groupAndApplyInserts(ConstIt std::vector<BSONObj> toInsert; // Make sure to include the first op in the batch size. - auto batchSize = entry.getObject().objsize(); + size_t batchSize = entry.getObject().objsize(); auto batchCount = OperationPtrs::size_type(1); auto batchNamespace = entry.getNss(); diff --git a/src/mongo/db/repl/sync_tail.cpp b/src/mongo/db/repl/sync_tail.cpp index ef39d869278..e7b666ff784 100644 --- a/src/mongo/db/repl/sync_tail.cpp +++ b/src/mongo/db/repl/sync_tail.cpp @@ -59,7 +59,7 @@ #include "mongo/db/logical_session_id.h" #include "mongo/db/multi_key_path_tracker.h" #include "mongo/db/namespace_string.h" -#include "mongo/db/query/query_knobs.h" +#include "mongo/db/query/query_knobs_gen.h" #include "mongo/db/repl/applier_helpers.h" #include "mongo/db/repl/apply_ops.h" #include "mongo/db/repl/bgsync.h" diff --git a/src/mongo/db/repl/sync_tail_test.cpp b/src/mongo/db/repl/sync_tail_test.cpp index 96c77646196..71c55ac584f 100644 --- a/src/mongo/db/repl/sync_tail_test.cpp +++ b/src/mongo/db/repl/sync_tail_test.cpp @@ -50,6 +50,7 @@ #include "mongo/db/db_raii.h" #include "mongo/db/dbdirectclient.h" #include "mongo/db/jsobj.h" +#include "mongo/db/ops/write_ops.h" #include "mongo/db/query/internal_plans.h" #include "mongo/db/repl/bgsync.h" #include "mongo/db/repl/drop_pending_collection_reaper.h" @@ -759,7 +760,7 @@ TEST_F(SyncTailTest, MultiSyncApplyLimitsBatchSizeWhenGroupingInsertOperations) auto createOp = makeCreateCollectionOplogEntry({Timestamp(Seconds(seconds++), 0), 1LL}, nss); // Create a sequence of insert ops that are too large to fit in one group. - int maxBatchSize = insertVectorMaxBytes; + int maxBatchSize = write_ops::insertVectorMaxBytes; int opsPerBatch = 3; int opSize = maxBatchSize / opsPerBatch - 500; // Leave some room for other oplog fields. @@ -807,7 +808,7 @@ TEST_F(SyncTailTest, MultiSyncApplyAppliesOpIndividuallyWhenOpIndividuallyExceed NamespaceString nss("test." + _agent.getSuiteName() + "_" + _agent.getTestName()); auto createOp = makeCreateCollectionOplogEntry({Timestamp(Seconds(seconds++), 0), 1LL}, nss); - int maxBatchSize = insertVectorMaxBytes; + int maxBatchSize = write_ops::insertVectorMaxBytes; // Create an insert op that exceeds the maximum batch size by itself. auto insertOpLarge = makeSizedInsertOp(nss, maxBatchSize, seconds++); auto insertOpSmall = makeSizedInsertOp(nss, 100, seconds++); |