[SERVER-47671] Check DatabaseShardingState for index build commit under an exception handler Created: 20/Apr/20  Updated: 29/Oct/23  Resolved: 08/May/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.0-rc5, 4.7.0

Type: Bug 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:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Execution Team 2020-05-18
Participants:
Linked BF Score: 30

 Description   

This invariant makes an assumption that index builds will not throw database exceptions except for when they commit, and we hold an X collection lock.

I thought I covered every exception-throwing region of index builds, but I think I missed a spot. We should move this DatabaseShardingState version check inside the subsequent try-catch block. We're already holding an X lock there so it will abort the index build as usual if the assertion fails.



 Comments   
Comment by Githook User [ 08/May/20 ]

Author:

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

Message: SERVER-47671 Check DatabaseShardingState for index build commit under an exception handler

(cherry picked from commit 8cb73850ec6b902c0d8fc1c5c0592ddabbdbfc67)
Branch: v4.4
https://github.com/mongodb/mongo/commit/7c49b2a463e25c7b402e25270da382aa59e4b92e

Comment by Githook User [ 07/May/20 ]

Author:

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

Message: SERVER-47671 Check DatabaseShardingState for index build commit under an exception handler
Branch: master
https://github.com/mongodb/mongo/commit/8cb73850ec6b902c0d8fc1c5c0592ddabbdbfc67

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