[SERVER-18985] setParameter should log at level 0 Created: 16/Jun/15  Updated: 05/Dec/18  Resolved: 30/Oct/18

Status: Closed
Project: Core Server
Component/s: Diagnostics, Internal Code
Affects Version/s: None
Fix Version/s: 3.4.19, 3.6.9, 4.0.4, 4.1.5

Type: Improvement Priority: Major - P3
Reporter: Kevin Pulo Assignee: Kevin Pulo
Resolution: Done Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-8552 setParameter command has confusing be... Backlog
related to SERVER-5892 setParameter for "logLevel" logged in... Closed
is related to SERVER-29291 Periodically record all active config... Open
is related to SERVER-18986 When increasing logLevel above 0, log... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0, v3.6, v3.4
Sprint: Sharding 2017-12-04, Sharding 2018-01-01, Sharding 2017-12-18
Participants:
Case:

 Description   

setParameter is used to modify a variety of server settings, many of which can have a marked impact on server behaviour and/or performance. Thus, in the context of analysing a logfile, it is vital to be aware of any changes to such parameters.

Since setParameter normally runs very fast, it will only be logged if logLevel is >= 1. It would be much better if the setParameter command was logged at the default log level of 0.

Two likely ways this could be done are either:

  1. forcing the normal command logging to be performed (for setParameter) irrespective of slowms (probably not so nice to implement):

    2015-06-15T13:20:42.990+1000 [conn1423] command admin.$cmd command: setParameter { setParameter: 1.0, parameterName: value, ... } keyUpdates:0 numYields:0  reslen:46 5ms
    

  2. or outputting a new log line (probably much easier to implement):

    2015-06-15T13:20:42.990+1000 [conn1423] setParameter { parameterName: value, ... }
    



 Comments   
Comment by Githook User [ 05/Dec/18 ]

Author:

{'name': 'Kevin Pulo', 'email': 'kevin.pulo@mongodb.com', 'username': 'devkev'}

Message: SERVER-18985 log setParameter commands

Manual backport of 4d8c956efe27360e8b6828ee62fd3df3ad8f5710
Branch: v3.4
https://github.com/mongodb/mongo/commit/6a6cd97acc29a0d7e5b001588ca71960a8a7f247

Comment by Githook User [ 30/Oct/18 ]

Author:

{'name': 'Kevin Pulo', 'email': 'kevin.pulo@mongodb.com', 'username': 'devkev'}

Message: SERVER-18985 log setParameter commands

(cherry picked from commit 4d8c956efe27360e8b6828ee62fd3df3ad8f5710)
Branch: v3.6
https://github.com/mongodb/mongo/commit/3545daef3b7f0dade1237c7536ba896b7b21b25b

Comment by Githook User [ 30/Oct/18 ]

Author:

{'name': 'Kevin Pulo', 'email': 'kevin.pulo@mongodb.com', 'username': 'devkev'}

Message: SERVER-18985 log setParameter commands

(cherry picked from commit 4d8c956efe27360e8b6828ee62fd3df3ad8f5710)
Branch: v4.0
https://github.com/mongodb/mongo/commit/a89c9b0384e04f7ab1a5ad3a68dfde29061b7571

Comment by Githook User [ 30/Oct/18 ]

Author:

{'name': 'Kevin Pulo', 'email': 'kevin.pulo@mongodb.com', 'username': 'devkev'}

Message: SERVER-18985 log setParameter commands
Branch: master
https://github.com/mongodb/mongo/commit/4d8c956efe27360e8b6828ee62fd3df3ad8f5710

Comment by Kevin Pulo [ 16/Jun/15 ]

The most common manifestation of this is when setting logLevel (see SERVER-5892). It defies expectations that decreasing logging from level 1 to 0 is logged verbosely, but increasing logging from level 0 to 1 (or higher) isn't recorded at all. This can make it difficult to know when exactly increased logging started (which is usually much more important than knowing when it stopped).

Generated at Thu Feb 08 03:49:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.