[SERVER-82069] Throwable function used in scope guard when registering index Created: 11/Oct/23  Updated: 30/Oct/23  Resolved: 20/Oct/23

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 7.1.1, 7.2.0-rc0, 7.0.4

Type: Bug Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 0
Labels: shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-67119 Add create/drop global indexes API Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.1, v7.0, v6.0
Sprint: Sharding EMEA 2023-10-16, Sharding EMEA 2023-10-30
Participants:
Linked BF Score: 32
Story Points: 2

 Description   

SERVER-67119 added an API to create and drop indexes registered in the sharding catalog. It was meant to be a first step before having a proper coordinator which will be implemented by PM-2852.

As part of the API, in order to ensure that migrations are always resumed, sharding_ddl_util::resumeMigrations is called in an ON_BLOCK_EXIT. Considering that if there is a stepdown in the config server when trying to resume migrations, the function might throw in that scenario, this might lead to a crash in the server because the scope guard destructor is declared as noexcept.



 Comments   
Comment by Githook User [ 20/Oct/23 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-82069 Call resumeMigrations outside of a ScopeGuard when registering indexes in the sharding catalog

(cherry picked from commit 1319f2ec72b12400ce56ce05f4673ba37a75d4b8)
Branch: v7.1
https://github.com/mongodb/mongo/commit/80690d86418b7a520281f1a49fce2ee08892886b

Comment by Githook User [ 20/Oct/23 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-82069 Call resumeMigrations outside of a ScopeGuard when registering indexes in the sharding catalog

(cherry picked from commit 1319f2ec72b12400ce56ce05f4673ba37a75d4b8)
Branch: v7.0
https://github.com/mongodb/mongo/commit/e028d7ec8f3ebb690d4ecad71d10f26ff0ab1908

Comment by Githook User [ 20/Oct/23 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-82069 Call resumeMigrations outside of a ScopeGuard when registering indexes in the sharding catalog
Branch: master
https://github.com/mongodb/mongo/commit/1319f2ec72b12400ce56ce05f4673ba37a75d4b8

Generated at Thu Feb 08 06:48:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.