[SERVER-57231] [ephemeralForTest] index build cleanup fails with invariant if WUOW throws WCE at commit time Created: 26/May/21  Updated: 29/Oct/23  Resolved: 28/May/21

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 5.0.0-rc2, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-58357 [ephemeralForTest] TemporaryKVRecordS... Closed
is related to SERVER-50293 TemporaryKVRecordStore should reset t... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0
Sprint: Execution Team 2021-05-31
Participants:
Linked BF Score: 129

 Description   

When an index build is aborted, it removes the temporary record stores for the hybrid index build.

If the storage transaction for removing the temporary record store is interrupted, the TemporaryKVRecordStore should reset its internal "finalized" flag in a rollback handler. However, the internal flag may not get reset if we get a WriteConflictException while trying to committing a WriteUnitOfWork in the ephemeralForTest storage engine (this is not possible with the default WiredTiger storage engine).

On a subsequent attempt to finalize the temporary record store, the server will fail this invariant.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 10/Jun/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57231 TemporaryKVRecordStore sets finalized flag in commit handler

(cherry picked from commit c3587aad77ce17c74ffe5cddec37160bd28240d4)
Branch: v5.0
https://github.com/mongodb/mongo/commit/c41985248d79599173798a0672d79f0e64a05600

Comment by Githook User [ 27/May/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-57231 TemporaryKVRecordStore sets finalized flag in commit handler
Branch: master
https://github.com/mongodb/mongo/commit/c3587aad77ce17c74ffe5cddec37160bd28240d4

Comment by Benety Goh [ 27/May/21 ]

This builds on the work done in SERVER-50293.

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