[SERVER-46595] createIndexes command fails to abort index build when interrupted Created: 03/Mar/20  Updated: 29/Oct/23  Resolved: 07/Apr/20

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

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
is related to SERVER-46397 concurrent dropIndexes on a primary c... Closed
is related to SERVER-44791 Abort index builds by interrupting th... Closed
is related to SERVER-46012 Aborting index builders through the I... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Execution Team 2020-04-06, Execution Team 2020-04-20
Participants:
Linked BF Score: 19

 Description   

The createIndexes command aborts the index build when it is interrupted while waiting on the Future object returned by IndexBuildsCoordinator::startIndexBuild. However, if the command is interrupted while it is still setting up the index build (here for example) the createIndexes command may fail early without aborting the index build.



 Comments   
Comment by Githook User [ 14/Apr/20 ]

Author:

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

Message: SERVER-46595 ignore interruptions in OpCtx when starting index build

(cherry picked from commit 51a424b3dcd50425fd4e782b6bc072533f211c12)
Branch: v4.4
https://github.com/mongodb/mongo/commit/656ee188b8db0c2ed0e00652ec1c0c47b964a795

Comment by Githook User [ 07/Apr/20 ]

Author:

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

Message: SERVER-46595 ignore interruptions in OpCtx when starting index build
Branch: master
https://github.com/mongodb/mongo/commit/51a424b3dcd50425fd4e782b6bc072533f211c12

Comment by Benety Goh [ 03/Mar/20 ]

An alternative fix could also be to avoid getting interrupted at the end of IndexBuildsCoordinatorMongod::startIndexBuild() by remove the opCtx argument to Future::getNoThrow().

Comment by Benety Goh [ 03/Mar/20 ]

One possible fix for this issue is to expand the scope of the exception handling blocks for Interruption-related errors to include startIndexBuild

Comment by Benety Goh [ 03/Mar/20 ]

Linking to other abort-related tickets SERVER-44791, SERVER-46012, and SERVER-46397.

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