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

Tenant Migration oplog applier may try to wrongly mark an index as multikey.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.0.0-rc4, 6.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • v6.0
    • Server Serverless 2022-04-18, Server Serverless 2022-05-02
    • 46

    Description

      After writing the record to collection table, we index records. While indexing records, we track any index keys that needs to be marked as multikey in the _mdb_catlog table for that collection, via opCtx decoration. And, we don't reset the tracker after marking the index as multi-key in the collection catalog entry. So, if write ops on different collection shares the same opCtx, we might wrongly mark an index as multi-key for a collection if the index keys of that collection has the same name as the multikey index name of the previously applied collection operation.

      In tenant oplog applier case, write ops on different collection that's get applied by the same TenantMigrationWriter thread in a single batch, will share the same opCtx. This can lead either to tenant migration failure due to this error or silently marking a wrong index as mutikey on recipient primary.

      Attachments

        Activity

          People

            christopher.caplinger@mongodb.com Christopher Caplinger
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: