-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Critical - P2
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
None
-
None
-
None
-
None
-
None
-
None
-
None
We should investigate whether any fields on CurOp can/should be moved to OpDebug, and vice versa.
One criteria we need to evaluate is thread-safety: a variable that needs to be accessed by other threads (notably in CurOp::reportState(), which is called by other threads for the $currentOp aggregation stage) should be defined on CurOp and accesses to it should be protected by a lock.
OpDebug, on the other hand, should only be accessed by the current operation's thread, so it does not need to protect any access with locks.
At a minimum, several fields defined on OpDebug are currently being reported in CurOp::reportState() - we should move those to CurOp and define thread-safe setters.