Wait for dropDatabase finishes at check_metadata_consistency.js

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2023-04-03, Sharding EMEA 2023-04-17
    • 38
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

            Assignee:
            Antonio Fuschetto
            Reporter:
            Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: