diff options
author | Benety Goh <benety@mongodb.com> | 2023-04-13 08:05:56 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-04-13 13:44:45 +0000 |
commit | 266a6db6201d3e05c7d91f56c7a7b005c692177d (patch) | |
tree | 8d57674f49fea445bf22dea2cd5730fb2aa01e1a /src/mongo/db/repl/oplog.h | |
parent | d3835e8e2fa6c66d558adfe562e902d24b2edd62 (diff) | |
download | mongo-266a6db6201d3e05c7d91f56c7a7b005c692177d.tar.gz |
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.
Diffstat (limited to 'src/mongo/db/repl/oplog.h')
-rw-r--r-- | src/mongo/db/repl/oplog.h | 16 |
1 files changed, 8 insertions, 8 deletions
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<OpTime> logInsertOps( - OperationContext* opCtx, - MutableOplogEntry* oplogEntryTemplate, - std::vector<InsertStatement>::const_iterator begin, - std::vector<InsertStatement>::const_iterator end, - const std::vector<bool>& fromMigrate, - std::function<boost::optional<ShardId>(const BSONObj& doc)> getDestinedRecipientFn, - const CollectionPtr& collectionPtr); +std::vector<OpTime> logInsertOps(OperationContext* opCtx, + MutableOplogEntry* oplogEntryTemplate, + std::vector<InsertStatement>::const_iterator begin, + std::vector<InsertStatement>::const_iterator end, + const std::vector<bool>& fromMigrate, + const ShardingWriteRouter& shardingWriteRouter, + const CollectionPtr& collectionPtr); /** * Returns the optime of the oplog entry written to the oplog. |