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

Do not generate "unique" field in oplog if collMod "unique" parameter is a no-op

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • ALL
    • v4.2
    • Execution Team 2021-12-13, Execution Team 2021-12-27

      If we use the collMod "unique" parameter, which currently has to be set to true, on a index that is already unique, the primary still generates the following oplog entry that will cause oplog application on a secondary to fail:

      {collMod: 'mycoll', index: {name: 'myidx', unique: false}}

      For a no-op "unique" collMod request, we should apply a strategy similar to that implemented in SERVER-48047.

      This is follow-up work to SERVER-61980 where we addressed a gap in the no-op "hidden" parameter when "unique" is also provided.

      This applies to a flag-guarded feature that is still under development.

            benety.goh@mongodb.com Benety Goh
            benety.goh@mongodb.com Benety Goh
            0 Vote for this issue
            2 Start watching this issue