-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Sharding 2022-03-07
Currently, the transaction API will never inject `startTransaction:true` or other "first transaction command" options (e.g. read/write concern) into a command in its client execution context. This works when the API is used by commands that aren't the first in their transaction, but is inconvenient when the command sent by the API actually will be the first sent for its client transaction, since the caller would need to manually include the start transaction options. Instead the API should infer this context based on the result of isStartingMultiDocumentTransaction() / isContinuingMultiDocumentTransaction() from the callers opCtx.
Additionally, we should add full unit test coverage for all logic branches in the API for the client transaction case, to supplement the integration coverage from SERVER-59186.
- is related to
-
SERVER-59186 [API] Use internal transaction API for changing a document's shard key logic
- Closed