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

cannot import collection with hidden index

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 7.2.0-rc0, 7.1.0-rc4, 7.0.3
    • Affects Version/s: 7.0.1
    • Component/s: None
    • None
    • Storage Execution
    • Fully Compatible
    • ALL
    • v7.1, v7.0
    • Hide

      1. Make a collection with a hidden secondary index
      2. Run exportCollection on the collection
      3. Attempt to re-import that collection with importCollection (drop existing collection first)
      4. Expected behavior: success Actual behavior: command returns error detailed in the Description.

      Show
      1. Make a collection with a hidden secondary index 2. Run exportCollection on the collection 3. Attempt to re-import that collection with importCollection (drop existing collection first) 4. Expected behavior: success Actual behavior: command returns error detailed in the Description.
    • Execution NAMR Team 2023-10-02

      Running the importCollection command with a collection with a hidden index results in an error from the validation code:

      Validated index spec { v: 2, hidden: true, key: { xxx: 1 }, name: "xxx_1" } does not match original { v: 2, key: { xxx: 1 }, name: "xxx_1", hidden: true })
      

      This is apparently because we are using woCompare in the validate logic here:
      https://github.com/10gen/mongo-enterprise-modules/blob/master/src/live_import/import_collection.cpp#L272
      but I'm not sure why the order of the fields is changing after prepareSpecForCreate().

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: