[SERVER-43638] Do not block prepared transactions on two-phase index builds on secondaries Created: 25/Sep/19  Updated: 29/Oct/23  Resolved: 10/Oct/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Task Priority: Major - P3
Reporter: Louis Williams Assignee: Louis Williams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-43692 enable two phase index builds by default Closed
Related
is related to SERVER-38588 Hybrid index builds do not work when ... Closed
is related to SERVER-40041 block prepared transactions behind in... Closed
is related to SERVER-43301 add no_passthrough to two phase index... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2019-10-21
Participants:
Case:

 Description   

The  index_builds_ignore_prepare_conflicts.js test was disabled by SERVER-43301.

To make this test pass, disable the fix put in by SERVER-38588 to block prepared transactions on index builds on secondaries.

When two-phase index builds are in use, it is both unnecessary and unsafe to block a prepared transactions on index builds on secondaries. Due to locking, we can guarantee that a transaction prepared on a primary during an index build will always commit before that index build completes. Because two-phase index builds replicate start and commit oplog entries, it will never be possible to replicate a prepared transaction, commit an index build, then commit the transaction, the bug SERVER-38588 addressed.

This blocking behavior can also introduce a deadlock with two-phase index builds on a secondary if a prepared transaction blocks on an index build, but the index build can't re-acquire its S or X lock because of the transaction.



 Comments   
Comment by Githook User [ 09/Oct/19 ]

Author:

{'username': 'louiswilliams', 'email': 'louis.williams@mongodb.com', 'name': 'Louis Williams'}

Message: SERVER-43638 Do not block prepared transactions on index builds on secondaries
Branch: master
https://github.com/mongodb/mongo/commit/906ac3ca78d352df2d0dd45350195251efe0dea1

Generated at Thu Feb 08 05:03:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.