[SERVER-44581] Index builds must ensure a storage transaction is active to correctly ignore prepare conflicts Created: 12/Nov/19  Updated: 06/Dec/22  Resolved: 12/Nov/19

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

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Backlog - Storage Execution Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-44577 Ensure WiredTiger cursors have starte... Closed
Assigned Teams:
Storage Execution
Operating System: ALL
Participants:

 Description   

The collection scan stage of index builds is not guaranteed to perform reads inside of a transaction. This is not normally problematic, because WiredTiger still guarantees snapshot isolation. The flag to ignore prepare conflicts with "ignore_prepare=true" is set on the call to "begin_transaction, so If no transaction is open, prepare conflicts will not be ignored.

The cursor used by the collection scan stage opens a transaction implicitly by a call to getSession(). The WriteUnitOfWork::commit() during index build collection scans ends the current WT transaction, and inactivates the RecoveryUnit. Any subsequent cursor operation will use a valid cursor, but not inside of a transaction, and not ignoring prepare conflicts.


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