[SERVER-80999] (SA) Allow mongod with embedded router to start up and initialize a single-shard cluster Created: 12/Sep/23  Updated: 05/Jan/24

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

Type: Task Priority: Major - P3
Reporter: George Wangensteen Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: pm-635-milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-82034 Initialize the router FTDC controller... Open
Assigned Teams:
Service Arch
Participants:

 Description   

Allow a mongod started in embedded-router mode to initialize the router's sharding state such that:

  • When requests for sharding-initialization commands (addShard, enableSharding, shardCollection) are received on the router port, the router role is able to successfully run these commands.

Note that this will require a few pieces of work:

  • Mapping out through experimentation + confirmation with the sharding team what sharding-state needs to be initialized, and what needs to be separately registered between router and shard services (i.e. CatalogCacheLoader, Grid, ShardingState, and any others)
  • Performing the dual registration and initialization of any decorations/globals that require separate implementations for shard and router, and removing any non-role-aware accesses
  • Writing logic in sharding_initialization and sharding_initialization_mongod that is called from mongod main when embedded router is enabled, that sets up the required state for the router to run the sharding-initialization commands
  • Integrating with a test-suite that we produce elsewhere for a single-shard cluster, or writing a noPassthrough test that starts a mongod with embedded router and confirms it can add a shard successfully.

Note that this will likely require multiple commits and separate JIRA tickets/subtasks should be cleaved off. But because I am not exactly sure of the best way to break down the work ahead-of-time, I am creating this ticket as a placeholder/box.


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