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

Setting multikey in _mdb_catalog can be out of timestamp order

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • Hide

      1. Start a replset
      2. In a mongo shell run (the order of the indexes and documents matter)

      db.test.createIndex(\{b: 1})
      db.test.createIndex(\{a: 1})
      db.test.insert([\{a: [1, 2]}, \{b: [1, 2]}])
      
      Show
      1. Start a replset 2. In a mongo shell run (the order of the indexes and documents matter) db.test.createIndex(\{b: 1}) db.test.createIndex(\{a: 1}) db.test.insert([\{a: [1, 2]}, \{b: [1, 2]}])
    • Execution Team 2021-11-01, Execution Team 2021-12-13, Execution Team 2021-12-27, Execution Team 2022-01-10, Execution Team 2022-02-07, Execution Team 2022-02-21, Execution Team 2022-03-07

      When inserting a batch of documents and indexing them, we will loop through the ready indexes, and then for each index we will loop through the documents. If a later document with a higher timestamp causes an earlier index to become multikey, the write to _mdb_catalog will use the higher timestamp. If then an earlier document causes a later index to become multikey, the second write to the catalog will use the earlier timestamp, which is out of order.

            Assignee:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Reporter:
            yuhong.zhang@mongodb.com Yuhong Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: