[SERVER-75494] Wait for dropDatabase finishes at check_metadata_consistency.js Created: 30/Mar/23  Updated: 29/Oct/23  Resolved: 03/Apr/23

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

Type: Bug Priority: Major - P3
Reporter: Pol Pinol Assignee: Antonio Fuschetto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-74079 Implement hidden collections cluster ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2023-04-03, Sharding EMEA 2023-04-17
Participants:
Linked BF Score: 38

 Description   

With new checks (hiddenShardedCollection) of the checkMetadataConsistency command, there is a possibility that check_metadata_consistency.js fails dropping databases and asserting 0 inconsistencies.

The routine of the failure may be the following one:

  1. Introduce HiddenShardedCollection inconsistency by dropping the database entry in config.database and leaving leftover collection entries.
  2. Drop database -> since the shards do not find the databases anymore in config.database they won't actually perform the drop operation and they won't clear the leftover collections
  3. Run cluster level checkMetadataConsistency cmd -> the command will still report the two inconsistencies created in this test case because they were not solved by the drop database operation.

One solution would be to re-write back the database entries we removed here and here, before to drop the databases



 Comments   
Comment by Githook User [ 03/Apr/23 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-75494 Wait for dropDatabase finishes at check_metadata_consistency.js
Branch: master
https://github.com/mongodb/mongo/commit/93483aa645a36be8d8608018434d22338e203d6b

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