-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
Cluster Scalability 2023-12-25, Cluster Scalability 2024-1-22, Cluster Scalability 2024-2-5, Cluster Scalability 2024-2-19, Cluster Scalability 2024-3-4
While profiling for invisible sharding performance, I noticed a few small things that can be improved in the router command path that likely won't move the needle but are simple to do:
- TrackingMetadata initializes an OID for every request, which increments an atomic, but doesn't use it unless tracking verbosity is on and the command uses a ShardRemote.
- Getting the connection string from a Shard type returns a copy and is used pretty often.
- The bulk write path maintains a map of written opTimes from ConnectionString to opTime, which is never used.