We set the ClientIsMasterMetadataState with appName here. Unfortunately, that happens after we evaluate failCommand here, so the first isMaster cannot have appName filters be applied to it.
The full solution is most likely to separate parse() from run() for isMaster. However, that is potentially disruptive to backport. The less intrusive answer is to separate the functionality that sets the metadata into its own function. We can then invoke that function in failCommand if we don't have client metadata.
- causes
-
SERVER-56935 "ClientMetadata was previously set" invariant in embedded SDK
- Closed
- is depended on by
-
SERVER-49220 failCommand with appName does not fail connection handshake command
- Closed
- is duplicated by
-
SERVER-48932 ReplicaSetMonitor hitting failpoint set during drivers test
- Closed
-
SERVER-49220 failCommand with appName does not fail connection handshake command
- Closed
-
SERVER-49815 mongos attach user client metadata to non-user request
- Closed
-
SERVER-50804 Make external (application) client info available for commands on shards and config servers
- Closed
- is related to
-
SERVER-53334 Hitting unexpected invariant failure, causing server shutdown
- Closed
- related to
-
SERVER-50517 Rename ClientMetadataIsMasterState to ClientMetadataHelloState
- Closed
-
SERVER-50804 Make external (application) client info available for commands on shards and config servers
- Closed