[SERVER-54102] Noop write for afterClusterTime/atClusterTime needs to target primary Created: 28/Jan/21  Updated: 29/Oct/23  Resolved: 02/Feb/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Bug Priority: Major - P3
Reporter: Jordi Serra Torrens Assignee: Jordi Serra Torrens
Resolution: Fixed Votes: 0
Labels: Sharding-EMEA, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-53105 Remove namespace field from config.ch... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2021-02-08
Participants:

 Description   

In waitForReadConcernImpl we perform a makeNoopWriteIfNeeded to bump up the clusterTime by running a appendOplogNote command

The command is run against the Shard object obtained here. If the waitForReadConcernImpl is running on a configsvr secondary, then Grid::get(opCtx)>shardRegistry()>getConfigShard() returns a ShardLocal instance. Then the appendOplogNote would be ran using the DBDirectClient agains the local node (secondary), which will fail.

We need to ensure that the appendOplogNote is ran against the replica set primary.

We could use ReplicationCoordinator::runCmdOnPrimaryAndAwaitResponse



 Comments   
Comment by Githook User [ 02/Feb/21 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-54102: Noop write for afterClusterTime/atClusterTime needs to target primary
Branch: master
https://github.com/mongodb/mongo/commit/dbd98eb603720f38f9c782ff167284dd878c9dc2

Generated at Thu Feb 08 05:32:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.