[SERVER-74281] Only attach minClusterTime read preference for sharding catalog operations Created: 22/Feb/23  Updated: 29/Oct/23  Resolved: 06/Jun/23

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

Type: Task Priority: Major - P3
Reporter: Jack Mulrow Assignee: Wenqin Ye
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Duplicate
is duplicated by SERVER-74415 SdamServerSelector Does Not Respect R... Closed
Related
is related to SERVER-74568 SdamServerSelector sometimes doesn't ... Closed
Assigned Teams:
Sharding NYC
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0
Sprint: Sharding NYC 2023-05-01, Sharding NYC 2023-05-15, Sharding NYC 2023-05-29, Sharding NYC 2023-06-12
Participants:

 Description   

ShardRemote has logic to attach a minClusterTime read preference to any command sent through it to a shard with the "config" shard name. After SERVER-73865, the config server will always use this name even when serving as a user data shard. That ticket changed this logic to only apply for the config and admin dbs, which contain sharding catalog metadata, but ideally we would only apply it when we know we're performing a catalog operation and not need to use the dbName (especially since at least one config db does not hold catalog metadata, "config.system.sessions").

There are at least two ways we can handle this:

  1. Guarantee we only use ShardRemote for catalog operations.
    1. Then we can always attach minClusterTime read preference.
  2. Attach minClusterTime read preference at a higher level in ShardRemote (or whatever components use it) when we know we're performing a catalog operation.


 Comments   
Comment by Githook User [ 09/Jun/23 ]

Author:

{'name': 'wenqinYe', 'email': 'wenqin908@gmail.com', 'username': 'wenqinYe'}

Message: SERVER-74281: Only attach minClusterTime read preference for sharding catalog operations

(cherry picked from commit 778634272e0854591bd6b17dc1fae653b7916562)
Branch: v7.0
https://github.com/mongodb/mongo/commit/055e16df243bb4ca7f71175799765710d7c9f4c1

Comment by Githook User [ 06/Jun/23 ]

Author:

{'name': 'wenqinYe', 'email': 'wenqin908@gmail.com', 'username': 'wenqinYe'}

Message: SERVER-74281: Only attach minClusterTime read preference for sharding catalog operations
Branch: master
https://github.com/mongodb/mongo/commit/778634272e0854591bd6b17dc1fae653b7916562

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