[SERVER-64132] Make shardsvrs running in serverless mode always return "unsharded" filtering metadata Created: 02/Mar/22  Updated: 29/Oct/23  Resolved: 04/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Janna Golden Assignee: Sophia Tan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-64133 Create terminate and stepdown jscore ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2022-03-21, Server Serverless 2022-04-04, Server Serverless 2022-04-18
Participants:

 Description   

Currently, mongod sometimes sets shardVersion UNSHARDED and does filtering metadata checks. If the filtering metadata is "unknown", the mongod can return StaleConfig to the client. Make sure to handle config.system.sessions, which gets automatically sharded by the config server. Also always return "ok" for the dbVersion check if needed.

Until user collections can be sharded in serverless, the sessions collection (config.system.sessions) will be the only sharded collection. While the architecture contains Atlas Proxy, shardsvrs must return unsharded metadata to avoid returning StaleConfig from the shardVersion check, since Atlas Proxy does not know how to handle StaleConfig. However, the logical session cache refresh and reap on internal nodes will load the sessions collection's real routing metadata and attach a real shardVersion on their requests to this node. So, for the sessions collection, this node must return its real routing metadata. It's ok if this node hasn't loaded the real routing metadata yet: this node will load the real routing metadata and return StaleConfig, and the sending node will handle StaleConfig by refreshing its routing metadata and retrying.



 Comments   
Comment by Githook User [ 31/Mar/22 ]

Author:

{'name': 'Sophia Tan', 'email': 'sophia_tll@hotmail.com', 'username': 'sophiatll'}

Message: SERVER-64132 Make shardsvrs running in serverless mode always return "unsharded" filtering metadata
Branch: master
https://github.com/mongodb/mongo/commit/2f2806eb4ca08b67392b6acc5d23c16e598c5f29

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