-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Server Programmability
-
Service Arch 2024-04-01, Service Arch 2024-04-15
PM-2965 seeks to allow users to connect to a single-shard cluster using a replica set connection string, i.e. one that points to the non-router port. That is, for a client connected to the router port, mongod will return mongos hello responses and service commands using the router code paths as usual. However, for a client connected to the non-router port, mongod will return mongod hello responses but service commands using the router code paths (i.e. ServiceEntryPointMongos) instead of the shard code paths (i.e. ServiceEntryPointCommon) except in the following cases:
- The command is not available on a router (here)
- The command node-specific command (here).
- The command is for the “local” database.
- The command is coming from an internal client.
That is, to know whether a request coming through the non-router port should be handled using ServiceEntryPointCommon or ServiceEntryPointMongos, we need to know what command it corresponds to and what database it is for. To get that information, we need to parse the Message into OpMsgRequest. However, currently the parsing is done separately later inside ServiceEntryPointCommon::handleRequest() or ServiceEntryPointMongod::handleRequest(). The proposal here is move the parsing above handleRequest() so we can implement the dispatching inside the ServiceEntryPointMongod.
- related to
-
SERVER-81968 Make mongod dispatch commands through router code paths if applicable
- Closed