Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-85657

Unsplittable_collections_created_on_any_shard_passthrough may attempt to recreate a collection on a different shard

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • CAR Team 2024-02-05
    • 150

      In the implicitly_create_unsplittable_collections_on_random_shards override file, we override both the getCollection and createCollection helpers. In each override, we call createUnsplittableCollectionOnRandomShard and we only check if the collection already exists in the getCollection override.

      SERVER-80135 caused the create collection coordinator to emit an error if a collection is created with a different data shard than the collection currently lives on (before this would return ok).

      This means that if a test creates an unsplittable collection on shard 0 via getCollection and then explicitly creates that collection, the override for createCollection may try to create the collection on shard 1, causing an AlreadyInitialized error.

      We should add a check to the createCollection override that doesn't attempt to create the collection if it already exists.

            Assignee:
            allison.easton@mongodb.com Allison Easton
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: