[SERVER-43019] IndexBuildsCoordinator removes interrupted index build at shutdown on secondary Created: 23/Aug/19  Updated: 29/Oct/23  Resolved: 29/Aug/19

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

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
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2
Sprint: Execution Team 2019-08-26, Execution Team 2019-09-09
Participants:
Linked BF Score: 32

 Description   

Part of the shutdown procedure on a secondary node in a replica set involves interrupting all active index builds. These interrupted index builds will be restarted on the next server startup. In certain situations, the abort mechanism in the IndexBuildsCoordinator may erroneously cause an active index build to be cleaned up in a non-restartable state.

----- OLD DESCRIPTION BELOW -----
MultiIndexBlock::insertAllDocuments() may erroneously return IndexBuildAborted instead of an InterruptedAtShutdown. This can happen if we check the index build's internal state in _getState() before checking the OperationContext.



 Comments   
Comment by Githook User [ 02/Sep/19 ]

Author:

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

Message: SERVER-43019 remove js test made redundant by indexbg_shutdown.js

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

Comment by Githook User [ 02/Sep/19 ]

Author:

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

Message: SERVER-43019 remove unreachable code from IndexBuildsCoordinator and rename function

The code for _shuttingDown was made unreachable by commit 267cb5ef67003897be3f46c138e92144d60848a8.

(cherry picked from commit 976c841bda34f6f7a9da52b540b70acda65ae2e0)
Branch: v4.2
https://github.com/mongodb/mongo/commit/462b65d41de276dfb4b156b00e642d921f53f9ab

Comment by Githook User [ 30/Aug/19 ]

Author:

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

Message: SERVER-43019 IndexBuildsCoordinator::interruptAllIndexBuildsForShutdown() stops aborting index builds

(cherry picked from commit c72617a4777e31bbd887632e9529b8e00ce0857a)
Branch: v4.2
https://github.com/mongodb/mongo/commit/267cb5ef67003897be3f46c138e92144d60848a8

Comment by Githook User [ 29/Aug/19 ]

Author:

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

Message: SERVER-43019 remove js test made redundant by indexbg_shutdown.js
Branch: master
https://github.com/mongodb/mongo/commit/a3014fa23e0123c3ac42b4d8e295c4f93600c685

Comment by Githook User [ 28/Aug/19 ]

Author:

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

Message: SERVER-43019 remove unreachable code from IndexBuildsCoordinator and rename function

The code for _shuttingDown was made unreachable by commit c72617a4777e31bbd887632e9529b8e00ce0857a.
Branch: master
https://github.com/mongodb/mongo/commit/976c841bda34f6f7a9da52b540b70acda65ae2e0

Comment by Githook User [ 28/Aug/19 ]

Author:

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

Message: SERVER-43019 IndexBuildsCoordinator::interruptAllIndexBuildsForShutdown() stops aborting index builds
Branch: master
https://github.com/mongodb/mongo/commit/c72617a4777e31bbd887632e9529b8e00ce0857a

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