[SERVER-57519] Make ARS use causally consistent ShardRegistry::getShard() function Created: 08/Jun/21  Updated: 29/Oct/23  Resolved: 08/Jul/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 5.3.0-rc4, 5.0.9, 6.0.0-rc13
Fix Version/s: 6.0.1, 5.0.10, 5.3.3, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-60916 CPS Restores failed with a snapshot w... Closed
related to SERVER-61003 ReadConcernMajorityNotAvailableYet er... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.3, v5.0
Sprint: Sharding EMEA 2022-06-27, Sharding EMEA 2022-07-11
Participants:
Linked BF Score: 20

 Description   

Currently the ARS uses the non-causally consistent ShardRegistry::getShardNoReload() function to retrieve the target shard.

This function doesn't guarantee that:

 

The ARS should use the causally consistent counter-part function  ShardRegistry::getShard().

A first attempt to fix this showed that is not feasible to call this blocking function using the internally stored operation context. As alternative solution we could provide a async version of the ShardRegistry::getShard that will be used in the ARS future-chain that implements the remote request scheduling.



 Comments   
Comment by Githook User [ 22/Jul/22 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-57519 Make ARS use causally consistent ShardRegistry::getShard() function

(cherry picked from commit 527dfe85a1771586339b34a177b3f7954aa2793b)
Branch: v6.0
https://github.com/mongodb/mongo/commit/e6d0a3ee2b265f2e41454ac6abfded7c19d3c441

Comment by Githook User [ 12/Jul/22 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-57519 Make ARS use causally consistent ShardRegistry::getShard() function

(cherry picked from commit 527dfe85a1771586339b34a177b3f7954aa2793b)
Branch: v5.0
https://github.com/mongodb/mongo/commit/546172a73eaac7126995938fe0db2d0191a8955d

Comment by Githook User [ 11/Jul/22 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-57519 Make ARS use causally consistent ShardRegistry::getShard() function

(cherry picked from commit 527dfe85a1771586339b34a177b3f7954aa2793b)
Branch: v5.3
https://github.com/mongodb/mongo/commit/4f9e10bb3019091f565188285db6717b65e4d74d

Comment by Githook User [ 08/Jul/22 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-57519 Make ARS use causally consistent ShardRegistry::getShard() function
Branch: master
https://github.com/mongodb/mongo/commit/527dfe85a1771586339b34a177b3f7954aa2793b

Comment by Tommaso Tocci [ 11/May/22 ]

There is a plan to deprecate the ARS in PM-2399

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