Details
-
Task
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
3
-
ServerDocs2021: Oct26 - Nov2, ServerDocs2021: Nov2 - Nov9
-
(copied to CRM)
Description
Description
Conditioned logging for slow operations on the sample rate.
Existing behavior prior to this ticket: https://docs.mongodb.com/manual/release-notes/4.2/#slow-oplog
Description of Linked Ticket
Here's the code in question: https://github.com/mongodb/mongo/blob/r3.6.14/src/mongo/db/repl/sync_tail.cpp#L335-L351
That should be doing something similar to https://github.com/mongodb/mongo/blob/r3.6.14/src/mongo/db/ops/write_ops_exec.cpp#L122-L124
This behaviour is called out in https://docs.mongodb.com/manual/release-notes/4.2/#slow-oplog, though I don't see any discussion on SERVER-32146 or DOCS-12178 for whether sampling was considered.
There's also a couple other places where this might need to be checked:
- https://github.com/mongodb/mongo/blob/r3.6.14/src/mongo/db/commands/eval.cpp#L131
- https://github.com/mongodb/mongo/blob/r3.6.14/src/mongo/db/s/split_vector.cpp#L263
It's possible a better fix would be to decouple slowOpSampleRate and slowms, such that you log all slow operations but then subject non-slow ops to sampling.
Scope of changes
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
Attachments
Issue Links
- documents
-
SERVER-43069 Ops that are slow to apply don't condition on slowOpSampleRate
-
- Closed
-