-
Type:
Bug
-
Resolution: Won't Do
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Sharding NYC
-
ALL
To speed up transaction oplog application, PM-3093 made secondaries apply the oplog entries for each prepared transaction in multiple internal sessions acquired from the InternalSessionPool. Currently, those internal sessions always have session id of the form (id, uid) regardless of session id for the transaction. For a transaction with session id of the form (id, uid, txnUUID), i.e. non-retryable internal transaction, this has caused the oplog entries for the transaction to show up in the chunk migration opTime buffer although the writes they correspond to are not retryable and therefore are discarded anyway. SERVER-76807 solved this by making OpObserver::onTransactionPrepareNonPrimary() additionally take in the transaction's session id and use that instead of the session id from the opCtx to initialize LogTransactionOperationsForShardingHandler. While this solved the issue, there may be some values in making secondaries use internal sessions with session id of the form (id, uid, txnUUID) instead since it preserves the fact the transaction is not retryable. However, the approach has some dependencies since:
- The InternalSessionPool doesn't currently support pooling sessions with session id for the form (id, uid, txnUUID) without specifying a parent.
- The SessionCatalog doesn't support reaping a session with session id for the form (id, uid, txnUUID) until its parent session is expired.
- is related to
-
SERVER-76807 The split prepared transaction mechanism causes opTimes for non-retryable internal transactions to get added to the session migration new opTime buffer
-
- Closed
-