[SERVER-75787] remove std::function reference from repl::logInsertOps Created: 06/Apr/23  Updated: 29/Oct/23  Resolved: 13/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-53679 No-op for filling in destined recipie... Closed
is related to SERVER-49822 Add destined recipient to oplog entri... Closed
is related to SERVER-74563 Streamline logical branches in opObse... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2023-04-17
Participants:

 Description   

repl::logInsertOps() accepts getDestinedRecipientFn which is defined by the only caller (in OpObserverImpl) to be a wrapper around ShardingWriteRouter::getReshardingDestinedRecipient(). We make this dependency clearer by replacing the std::function with a direct call to ShardingWriteRouter without incurring any additional explicit link time dependency on shard_role_api (since the library containing oplog.cpp has an existing dependency on shard_role).



 Comments   
Comment by Githook User [ 13/Apr/23 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: 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.
Branch: master
https://github.com/mongodb/mongo/commit/266a6db6201d3e05c7d91f56c7a7b005c692177d

Comment by Githook User [ 12/Apr/23 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-75787 OplogWriter::logInsertOps() accepts ShardingWriteRouter instead of wrapper function
Branch: master
https://github.com/mongodb/mongo/commit/7b9a7f3853a3e1b1b6530b05ecdfa175730dae7f

Generated at Thu Feb 08 06:31:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.