-
Type: Task
-
Resolution: Unresolved
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Server
-
Labels:
Slow replication logs (printed when secondaries take longer than the slow operation threshold to apply an oplog entry) will now contain extra storage information when applicable. If there is no storage information available, the field will be empty, similar to regular slow operation logs.
I don't know if we list the content of slow log lines in our MongoDB documentation. I couldn't find anything at the following links:
- https://www.mongodb.com/docs/manual/core/replica-set-oplog/#std-label-slow-oplog-application
- https://www.mongodb.com/docs/manual/reference/command/profile/#command-fields
Description of Linked Ticket
The current implementation of replicated slow operation logging, found in oplog_applier_impl.cpp finishAndLogApply() only logs very basic information about the slow operation: the BSON of the oplog entry itself, its wall clock duration, and its size.
For normal (client-generated) slow query operation logging, we also include a number of fields that are relevant only to client-initiated queries, like the read preference and the number of bytes returned. Finally, we include a storage section that includes information on how many bytes were read and written.
It is this last section that can be very valuable. I undertook a recent slowness investigation that turned out to be insert operations to a collection with very large multi-key index entries, and this could have been diagnosed a lot faster if we had the storage information in the replication slow logs like we do for regular slow log entries.
- documents
-
SERVER-78509 Add storage stats to replicated slow op log entries
- Closed