-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.6.14, 4.0.12, 4.2.0
-
Component/s: None
-
Fully Compatible
-
ALL
-
Repl 2020-02-10
-
(copied to CRM)
-
39
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.
- is depended on by
-
SERVER-46030 Logging should accommodate a 0 ms slow op threshold
- Closed
- is related to
-
SERVER-44881 Giant slow oplog entries are being logged in full
- Backlog