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

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

    • Storage Execution
    • Fully Compatible
    • ALL
    • v7.3, v7.0
    • 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, Execution Team 2024-03-04
    • 160

      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.

       

        1. backtrace.json
          16 kB
          Aleksandr Nechaev

            Assignee:
            gavin.peters@mongodb.com Gavin Peters (Inactive)
            Reporter:
            dapqa.dev@gmail.com Aleksandr Nechaev
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: