[SERVER-81305] Why is the MongoDB prompting to kill op? Created: 21/Sep/23  Updated: 02/Oct/23  Resolved: 02/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.4.24
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Sanjay Sanghera Assignee: Alison Rhea Thorne
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

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

 

 



 Comments   
Comment by Alison Rhea Thorne [ 02/Oct/23 ]

Thank you for the updated information. However, the version that you are reporting this behavior for has not been maintained for quite some time as noted on our MongoDB Software Lifecycle Schedules page. We are unfortunately unable to help investigate in the SERVER project, which is for bugs and feature requests in current versions. For assistance troubleshooting end of life versions, please post on the mongodb-user group or on Stack Overflow with the mongodb tag. Alternatively, please open a ticket with a replication of your reported behavior on a maintained version of the MongoDB server (at this time of writing, MongoDB 4.4 and above).

Comment by Sanjay Sanghera [ 29/Sep/23 ]

Hi Alison, the Mongo version is 3.4.24 and the collection is 8.9GB

Comment by Alison Rhea Thorne [ 28/Sep/23 ]

Hello sanjay.sanghera@gmail.com,

Thank you for your report! Unfortunately, I seem to be unable to replicate the behavior that you are reporting on the current release of MongoDB (7.0.1 at the time of this writing). I would like to note that the prompt that you are receiving however, should only be encountered in cases where the shell is being requested to kill all ongoing operations (such as on ctrl-c, or exit). That said, I have a few questions regarding your report that should help us determine the cause of this issue:

  • What are the current server and mongo shell versions that you are running?
  • How large is the collection in question?
Generated at Thu Feb 08 06:46:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.