[SERVER-40680] RestartCatalog command should take RSTL lock in X mode Created: 16/Apr/19  Updated: 29/Oct/23  Resolved: 22/Apr/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.1.11

Type: Bug Priority: Major - P3
Reporter: Xiangyu Yao (Inactive) Assignee: Xiangyu Yao (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
Related
related to SERVER-40993 Make restartCatalog command uninterru... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage NYC 2019-04-22, Storage NYC 2019-05-06
Participants:
Linked BF Score: 11

 Description   

RestartCatalog can be interruptible by stepdown after SERVER-40604 because ViewCatalog::reloadIfNeeded takes an interruptible collection lock. It violates our assumption that restartCatalog can not be interrupted.

Although in production stepdown can never happen when restartCatalog gets called by rollback because rollback already takes RSTL X lock, some tests that exercise both restartCatalog command and stepdown could have this issue. So we should take RSTL X lock in restartCatalog.



 Comments   
Comment by Githook User [ 22/Apr/19 ]

Author:

{'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}

Message: SERVER-40680 restartCatalog should take RSTL X lock
Branch: master
https://github.com/mongodb/mongo/commit/414390fc79f421201c4b293cfc62d8416f6bcf9f

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