Mongorestore fails when collMod an index lacking expireAfterSeconds and hidden

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • patch-next
    • Affects Version/s: None
    • Component/s: None
    • 3
    • Tools and Replicator
    • 1

      Problem Statement/Rationale

      In practice, it is possible that a collMod operation can run without specifying neither expireAfterSeconds or hidden. However, using mongorestore to restore a collMod oplog on an index, it triggers an error if the collMod lacks both of the options:

      Failed: restore error: error applying oplog: could not handle collMod on test.index_prepareUnique: must specify expireAfterSeconds or hidden: ...
      

      Steps to Reproduce

      1. Start mongodump and dump the oplog
      2. Run collMod on an index with options lacking expireAfterSeconds and hidden.
      3. Restore the oplog using mongorestore

      Expected Results

      Mongorestore should apply the collMod operation correctly without crashing

      Actual Results

      Mongorestore crashes with the error

      Additional Notes

      This bug showed up in a passthrough test (link)

            Assignee:
            Jian Guan
            Reporter:
            Jian Guan
            Felipe Gasper, Nick Weinberger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: