[SERVER-42824] do not lock RSTL for index build cleanup Created: 14/Aug/19  Updated: 29/Oct/23  Resolved: 22/Aug/19

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

Type: Task 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
Related
related to SERVER-42869 IndexBuildInterceptor rollback handle... Closed
related to SERVER-45553 Single phase hybrid index build shoul... Closed
related to SERVER-43837 remove RSTL unlocking logic from Mult... Closed
related to SERVER-44045 allow secondary index builds to start... Closed
is related to SERVER-42621 3 way deadlock can happen between hyb... Closed
is related to SERVER-41462 do not lock RSTL for uninterruptible ... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2
Sprint: Execution Team 2019-08-26
Participants:

 Description   

In order to break the cycle of some potential 3-way deadlocks involving index builds, prepared transactions, and step down, we will investigate not acquiring the RSTL for index build cleanup. Index build cleanup does not require synchronization with replica set state transitions. See SERVER-42621 for description of a potential deadlock.



 Comments   
Comment by Githook User [ 29/Aug/19 ]

Author:

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

Message: SERVER-42824 unlock RSTL for index build cleanup

(cherry picked from commit c9ae987cb111dc19ffbbcee1436da8077fbbc11f)
Branch: v4.2
https://github.com/mongodb/mongo/commit/2da6db231cf99de7eee335d5009420eef9830a45

Comment by Githook User [ 28/Aug/19 ]

Author:

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

Message: SERVER-42824 remove temp tables before acquiring collection locks during index build cleanup

(cherry picked from commit f8a233744b5e39c802ddd42c51d2e707f0c57bbe)
Branch: v4.2
https://github.com/mongodb/mongo/commit/011c365698ac3a60dc901f4f17c71f12e56edd07

Comment by Githook User [ 28/Aug/19 ]

Author:

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

Message: SERVER-42824 MultiIndexBlock::cleanUpAfterBuild() returns early if there are no indexes to clean up

(cherry picked from commit e94d9343cfd381a15222ac77a407515bf8645785)
Branch: v4.2
https://github.com/mongodb/mongo/commit/4f556095213c2b3e83c5b6e4de73307688094fb6

Comment by Githook User [ 22/Aug/19 ]

Author:

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

Message: SERVER-42824 unlock RSTL for index build cleanup
Branch: master
https://github.com/mongodb/mongo/commit/c9ae987cb111dc19ffbbcee1436da8077fbbc11f

Comment by Githook User [ 22/Aug/19 ]

Author:

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

Message: SERVER-42824 remove temp tables before acquiring collection locks during index build cleanup
Branch: master
https://github.com/mongodb/mongo/commit/f8a233744b5e39c802ddd42c51d2e707f0c57bbe

Comment by Githook User [ 22/Aug/19 ]

Author:

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

Message: SERVER-42824 MultiIndexBlock::cleanUpAfterBuild() returns early if there are no indexes to clean up
Branch: master
https://github.com/mongodb/mongo/commit/e94d9343cfd381a15222ac77a407515bf8645785

Comment by Benety Goh [ 14/Aug/19 ]

A similar fix was applied to index builds on secondaries in SERVER-41462.

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