[SERVER-17942] Long running operations should be logged periodically Created: 08/Apr/15  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Logging, Write Ops
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Alexander Komyagin Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 1
Labels: diagnosibility, storch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Query Execution
Participants:

 Description   

Consider a long-running multi-delete operation that ends past the end of the logfile that we have (e.g. it ran for 24 hours on an active multi-TB collection). There would be no way to determine whether this op is running without analyzing db.currentOp() (which is not an easy task). And you also would need to know to look there.

A good option would be to log all long-running operations periodically, let's say each 10 minutes or so.



 Comments   
Comment by Bruce Lucas (Inactive) [ 22/May/19 ]

I bumped the priority because this comes up not infrequently in diagnosing crashes (e.g. OOM) due to long-running queries.

Comment by Eric Sedor [ 21/May/19 ]

This could be beneficial in OOM and other crash-like situations during which offending operations aren't logged at all. In these cases, 10 minutes would probably be too high, so it would be helpful to have a configurable number of seconds that could be tune down, even if the default was relatively high.

Comment by Alexander Komyagin [ 08/Apr/15 ]

I think queries, removes, updates. Maybe some bulk/batch inserts and other write commands, too. IMHO there is a need for X - Y:10 should be sufficient and easier to understand.

Comment by Scott Hernandez (Inactive) [ 08/Apr/15 ]

What are long-running operations?

Do you really want, log operations running for more than X minutes, every Y minutes? Maybe with X:15, Y:10?

Generated at Thu Feb 08 03:46:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.