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

Fix collection_uuid_drop.js in sharded_collections_jscore_passthrough_with_config_transitions

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc5
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • Fully Compatible
    • v8.0
    • Cluster Scalability 2024-5-27
    • 0

      collection_uuid_drop.js uses a drop with a UUID, which can fail if the collection has been resharded in the background, because that changes the UUID. sharded_collections_jscore_passthrough_with_config_transitions expects collections to be sharded by the implicitly shard accessed collections hook, but due to a quirk in how it works, the test's main collection is always created as an unsharded collection, which exposes it to this issue. The hook shards when a collection is first accessed as a JS property on a database object, or when createCollection is explicitly used, but this test accesses the collection, then drops its database, then implicitly creates the collection with an insert.

      If we modify the test to first drop the database then access the collection, the collection should always be sharded, preventing the UUID problem.

            Assignee:
            jack.mulrow@mongodb.com Jack Mulrow
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: