[SERVER-33653] move currentOpTime field from op to top level of currentOp output Created: 05/Mar/18  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Eric Milkie Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Participants:

 Description   

In SERVER-24529, the current time was added as a field to the currentOp output. Unfortunately, it was added to every op that is output (including inactive ones). We should move this field to the top level of the output, at the same level as "inprog" and "ok", since we only need to see the time once for a given run of currentOp. We should also change the name of this field to "currentTime" or simply "time", to reduce confusion.



 Comments   
Comment by Eric Milkie [ 08/Mar/18 ]

(The original name of "currentOpTime" was apparently intended to mean "currentOp Time", for "the time for this currentOp".)

Comment by Eric Milkie [ 08/Mar/18 ]

It is, in fact, a wall clock time.
Its presence was originally requested by Triage Team to help in determining when a currentOp output obtained from a user was actually run, so that it can be correlated with log messages from the system log.

Comment by Andy Schwerin [ 08/Mar/18 ]

The problem with current time is that it sounds like a wall clock time. What is the type of this field? If it excludes term, clusterTime might be the right name...

Comment by Eric Milkie [ 07/Mar/18 ]

Yes please, the renaming of the field will be helpful.

Comment by David Storch [ 07/Mar/18 ]

The modern implementation for gathering CurOp-related diagnostic data is the $currentOp aggregation stage, which returns a cursor rather than a single document. Therefore, there is no "top level" position where the currentOpTime field could live. We could, however, rename the field to currentTime, if we believe that this would reduce confusion.

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