From 266a6db6201d3e05c7d91f56c7a7b005c692177d Mon Sep 17 00:00:00 2001 From: Benety Goh Date: Thu, 13 Apr 2023 08:05:56 -0400 Subject: SERVER-75787 repl::logInsertOps() accepts ShardingWriteRouter instead of wrapper function This removes the indirection from the wrapper function and clarifies the dependency on shard_role_api. --- src/mongo/db/repl/oplog.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/mongo/db/repl/oplog.h') diff --git a/src/mongo/db/repl/oplog.h b/src/mongo/db/repl/oplog.h index aadd004b6f3..c94c562f1b0 100644 --- a/src/mongo/db/repl/oplog.h +++ b/src/mongo/db/repl/oplog.h @@ -42,6 +42,7 @@ #include "mongo/db/repl/oplog_entry_or_grouped_inserts.h" #include "mongo/db/repl/optime.h" #include "mongo/db/repl/replication_coordinator.h" +#include "mongo/db/s/sharding_write_router.h" #include "mongo/db/session/logical_session_id.h" namespace mongo { @@ -131,14 +132,13 @@ void createOplog(OperationContext* opCtx); * @param fromMigrate: a list of 'fromMigrate' values for the inserts. * */ -std::vector logInsertOps( - OperationContext* opCtx, - MutableOplogEntry* oplogEntryTemplate, - std::vector::const_iterator begin, - std::vector::const_iterator end, - const std::vector& fromMigrate, - std::function(const BSONObj& doc)> getDestinedRecipientFn, - const CollectionPtr& collectionPtr); +std::vector logInsertOps(OperationContext* opCtx, + MutableOplogEntry* oplogEntryTemplate, + std::vector::const_iterator begin, + std::vector::const_iterator end, + const std::vector& fromMigrate, + const ShardingWriteRouter& shardingWriteRouter, + const CollectionPtr& collectionPtr); /** * Returns the optime of the oplog entry written to the oplog. -- cgit v1.2.1