[SERVER-38809] Ensure "comment" field is always present in logfile entries, even when maxLogSizeKB is exceeded Created: 02/Jan/19  Updated: 07/Jan/19  Resolved: 04/Jan/19

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Mark Brinsmead Assignee: Asya Kamsky
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-36441 Don't truncate 'comment' command para... Backlog
is duplicated by SERVER-38808 Ensure "comment Closed
Participants:
Case:

 Description   

The "comment" ($comment) field in various database commands is often used to track the source/nature of an operation for special purposes such as performance management.

In some cases, this field can be elided in log entries that exceed maxLogSizeKB , impairing the manageability of the database.

Please provide a means to ensure that the comment field is always logged.



 Comments   
Comment by Asya Kamsky [ 07/Jan/19 ]

uma.west@rbs.com the comment in SERVER-36441 points out that it's tracking the same work we already did for currentOp command under SERVER-27439 - it's not clear from the title but SERVER-36441 tracks both, not omitting the comment field when the full log line exceeds maximum and also not to truncate the contents of comment when the log line does not exceed the maximum. I'll try to make it more clear in the description.

Comment by Uma West [ 07/Jan/19 ]

Asya,

They are different from a user perspective.

SERVER-36441 is to not truncate `$comment` when it is more than 150 characters (while the total log size is below the `maxLogSizeKB`).  Currently, say total log length is 5KB and `$comment` length is 160 characters the log line is printed fully (with default `maxLogSizeKB`) but the `$comment` is truncated to 150 characters though the total log size can allow more characters.

This one (SERVER-38809) is to not truncate the `comment` field (say 100 characters) within the log when the total log size is more than `maxLogSizeKB`  (some others fields in the log might be truncated). Say total log length is 12KB, while some of the fields like `filter` or `planSummary` are truncated can `comment` field be printed in full (as per SERVER-36441 limits) within the log for performance analysis purposes.

Comment by Asya Kamsky [ 04/Jan/19 ]

This appears to be a duplicate of SERVER-36441.

If I misread something and it's not, please reopen and clarify the differences.

Comment by Kevin Pulo [ 03/Jan/19 ]

As a possible partial workaround, it would help to minimise the occurrence of this if drivers ensured that the comment field was placed immediately after the command (and similarly any $comment field first in any query predicate). However, current driver behaviour in this regard likely varies, and they are unlikely to provide any user-facing control over when/where this field is placed.

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