Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
None
-
Fully Compatible
-
ALL
-
v4.2
-
Repl 2019-09-09, Repl 2019-09-23
-
12
Description
When we reconstruct prepared transactions during replication recovery, we do not explicitly call OperationContext::setInMultiDocumentTransaction(), which means that OperationContext::inMultiDocumentTransaction() will return false. This has implications for multikey writes that are done inside a prepared transaction that is being reconstructed. When we set an index to be multikey, we expect this check to tell us whether we are inside a transaction and, as a result, need to do the multikey write in a side transaction. If we do not do the write in a side transaction, the multikey write can generate prepare conflicts on the catalog object, which is undesired. The simplest way to address this may be to just call OperationContext::setInMultiDocumentTransaction() explicitly before applying a prepared transaction during recovery.
Attachments
Issue Links
- is related to
-
SERVER-42755 recover_prepared_txn_with_multikey_write.js should make sure no prepare conflicts are generated on catalog object after restarting node
-
- Closed
-
- related to
-
SERVER-40466 Unify checks for inMultiDocumentTransaction and friends
-
- Closed
-