-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Cluster Scalability
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