[SERVER-31411] Decide if non-sharded RS should do a noop write Created: 05/Oct/17  Updated: 12/Dec/23

Status: Backlog
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.3 Desired

Type: Task Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Backlog - Cluster Scalability
Resolution: Unresolved Votes: 0
Labels: LamontN
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Cluster Scalability
Participants:

 Description   

Currently non-sharded RS will not do a noop write.
https://github.com/mongodb/mongo/blob/r3.5.13/src/mongo/db/read_concern.cpp#L83-L86
RS it the only source of clusterTime it will always get it once its replicated.

However it leaves the scenario where primary steps down after performing the write which returns to a client an operationTime X and the follow up request with afterClusterTime:X to a secondary will hang.
If secondary do the noop write it will avoid the hang
However in this case it will not get the data written to the primary anyways. Hence the query may return a non causally consistent result.
It differs from the scenario where shard1 returns operationTime X and then client issues a read to a shard2 with afterClusterTime:X and forces shard2 do a noop write if its clusterTime is < X



 Comments   
Comment by Misha Tyulenev [ 01/Aug/19 ]

Marking as desired hence it existed since 3.6 and does not appear to be hit by a customer.

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