[SERVER-56173] FCV upgrade to 5.0 can fail in presence of concurrent collection drop Created: 19/Apr/21  Updated: 29/Oct/23  Resolved: 26/Apr/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Jordi Serra Torrens Assignee: Jordi Serra Torrens
Resolution: Fixed Votes: 0
Labels: PM-1965-Milestone-0-Metadata-Format
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-55637 Create random_DDL_CRUD_setFCV_operati... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

With featureFlagShardingFullDDLSupportTimestampedVersion enabled, the FCV upgrade process can fail upon the following sequence of events:
1. Shards enter phase1 of the FCV update. (Meaning they will still use the legacy DDL paths)
2. The configsvr reads the current sharded collections, and performs the phase1 of the metadata patchup.
2. A collection is dropped. The legacy path first deletes the chunks, but it has not yet deleted the config.collections document.
3. The configsvr, as part of the setFCV procedure, tells shards to refresh that collection. The shards will try to refresh their catalog cache, but it will fail with ConflictingOperationInProgress (because the config.collections document still exists, but no chunk was found).

This could be solved by either catching the ConflictingOperationInProgress error, or by telling the shards to refresh after they have entered phase2 of the FCV (because on the new DDL path, dropCollection first deletes the config.collections document, and later the chunks.



 Comments   
Comment by Githook User [ 26/Apr/21 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-56173: FCV upgrade to 5.0 can fail to refresh collection on shards in presence of concurrent drop
Branch: master
https://github.com/mongodb/mongo/commit/6fb420bca5031e4864db1260a490b21cc699a129

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