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

Why is the MongoDB prompting to kill op?

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.24
    • Component/s: None
    • None
    • ALL

      db.getCollection('dfm_nodeBatchStatus').remove( {"action": "SKIP", "status": "SKIPPED",date:{ $lt : new Date(ISODate().getTime() - 1000 * 86400 * 6)} } )

       

      When I run the above command I get prompted with the following:

      "do you want to kill the current op(s) on the server? (y/n)"

      Please can you advise on how this prompt is being triggered and how I can prevent it from happening?

      Here is the full script being executed. The previous commands run fine, I only get prompted for the last remove operation.

      use dfm
      db.getCollection('dfm_nodeBatchStatus').remove( {"action": "SKIP", "status": "SKIPPED",date:{ $lt : new Date(ISODate().getTime() - 1000 * 86400 * 15)} } )
      db.getCollection('dfm_nodeBatchStatus').remove( {"action": "SKIP", "status": "SKIPPED",date:{ $lt : new Date(ISODate().getTime() - 1000 * 86400 * 14)} } )
      db.getCollection('dfm_nodeBatchStatus').remove( {"action": "SKIP", "status": "SKIPPED",date:{ $lt : new Date(ISODate().getTime() - 1000 * 86400 * 13)} } )
      db.getCollection('dfm_nodeBatchStatus').remove( {"action": "SKIP", "status": "SKIPPED",date:{ $lt : new Date(ISODate().getTime() - 1000 * 86400 * 12)} } )
      db.getCollection('dfm_nodeBatchStatus').remove( {"action": "SKIP", "status": "SKIPPED",date:{ $lt : new Date(ISODate().getTime() - 1000 * 86400 * 10)} } )
      db.getCollection('dfm_nodeBatchStatus').remove( {"action": "SKIP", "status": "SKIPPED",date:{ $lt : new Date(ISODate().getTime() - 1000 * 86400 * 9)} } )
      db.getCollection('dfm_nodeBatchStatus').remove( {"action": "SKIP", "status": "SKIPPED",date:{ $lt : new Date(ISODate().getTime() - 1000 * 86400 * 8)} } )
      db.getCollection('dfm_nodeBatchStatus').remove( {"action": "SKIP", "status": "SKIPPED",date:{ $lt : new Date(ISODate().getTime() - 1000 * 86400 * 7)} } )
      db.getCollection('dfm_nodeBatchStatus').remove( {"action": "SKIP", "status": "SKIPPED",date:{ $lt : new Date(ISODate().getTime() - 1000 * 86400 * 6)} } )
      exit

      This is the full output, as you can see it is running the other remove operations fine

      switched to db dfm
      WriteResult({ "nRemoved" : 0 })
      WriteResult({ "nRemoved" : 0 })
      WriteResult({ "nRemoved" : 0 })
      WriteResult({ "nRemoved" : 0 })
      WriteResult({ "nRemoved" : 0 })
      WriteResult({ "nRemoved" : 0 })
      WriteResult({ "nRemoved" : 0 })
      WriteResult({ "nRemoved" : 0 })

      do you want to kill the current op(s) on the server? (y/n): 2023-09-21T05:31:18.493-0700 I CONTROL  [main] shutting down with code:0

       

       

            Assignee:
            rhea.thorne@mongodb.com Alison Rhea Thorne
            Reporter:
            sanjay.sanghera@gmail.com Sanjay Sanghera
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: