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

Mongo 7 crashes on applyOps index delete/drops without a collection UUID

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • 7.0.4
    • None
    • Storage Execution
    • ALL
    • Hide

      See the description.

      Show
      See the description.
    • Execution Team 2024-01-08, Execution Team 2024-01-22, Execution Team 2024-02-05, Execution Team 2024-02-19

    Description

      Steps to reproduce:

      1. Run Mongo 7+ and connect to it

      docker run -d -p 27017:27017 --name mongo7-test mongo:7.0.2 --replSet mongo-test-rs 

      2. Create an index and try dropping it via applyOps: dropIndexes, but omitting the ui field:

      use test
       
      rs.initiate()
       
      db.testColl.createIndex({a: 1})
       
      db.runCommand({applyOps: [{ op: 'c', ns: 'test.$cmd', o: { dropIndexes: 'testColl', index: 'a_1' }, o2: { v: 2, key: { a: 1 }, name: 'a_1' }}]}) 

      Actual behavior:
      Connection is closed (EOF).
      On a server side, there is a fatal message in the log that a thread is terminated without an exception (backtrace is attached).

      Expected behavior:

      I'm not sure whether it should be able drop the index without specifying UUID (other commands work this way, e.g. see https://jira.mongodb.org/browse/SERVER-36951), but in Mongo 4.4-6.0 this runCommand has no effect: it completes successfully, but no indexes are dropped.

      For Mongo 7+, this runCommand should not cause a crash as well.

       

      Attachments

        Activity

          People

            gavin.peters@mongodb.com Gavin Peters
            dapqa.dev@gmail.com Aleksandr Nechaev
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: