Find operations are no longer killed by closing the connection to the server

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc1
    • Affects Version/s: 9.0.0-rc1015
    • Component/s: None
    • None
    • Query Integration
    • Major Change
    • ALL
    • Hide
      db.ctrlc.find({ $where: 'while(true) { /* loop1 */ }' });
      
      db.aggregate([ {$currentOp: {} }, { $match: { 'command.find': 'ctrlc' } }, { $project: { command: 1 } } ]);
      
      Show
      db.ctrlc.find({ $where: ' while ( true ) { /* loop1 */ }' }); db.aggregate([ {$currentOp: {} }, { $match: { 'command.find' : 'ctrlc' } }, { $project: { command: 1 } } ]);
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Failing tests: MONGOSH-3378, MONGOSH-3381, MONGOSH-3382, MONGOSH-3412, MONGOSH-3413

      Reveal that launching a shell with

      db.ctrlc.find({ $where: 'while(true) { /* loop1 */ }' });
      

      and sending SIGINT to the process which calls MongoClient close and leads to all connections shutting (including in progress operation ones) does not produce an empty result for the current operations on that namespace:

      db.aggregate([ {$currentOp: {} }, { $match: { 'command.find': 'ctrlc' } }, { $project: { command: 1 } } ]);
      

      There's a test skip PR open on mongosh that may have more details of the exact order of events: https://github.com/mongodb-js/mongosh/pull/2762 / specific test: https://github.com/mongodb-js/mongosh/blob/fa80aa2965c58c5f5610c404ab579006b252e27d/packages/cli-repl/src/cli-repl.spec.ts#L2312-L2337

      • buildInfo:
        • version: '9.0.0-alpha0-43d549a0',
        • gitVersion: '43d549a04a2e64f1ddd39794229b63aaec718fed'

            Assignee:
            Lee Maguire
            Reporter:
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: