[SERVER-41352] Incorrect verbose configuration in the wiredtiger connection string Created: 29/May/19  Updated: 29/Oct/23  Resolved: 18/Jun/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.2.0-rc2, 4.3.1

Type: Bug Priority: Major - P3
Reporter: Sulabh Mahajan Assignee: Zach Yam (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-39881 Enable verbose compact logging Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2
Sprint: Execution Team 2019-06-17, Execution Team 2019-07-01
Participants:

 Description   

While debugging another ticket I noticed the following WT connection string is being used by MongoDB:

2019-05-29T04:15:12.786+0000 I  STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=7272M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),verbose=(checkpoint_progress),

This comes from the following string generation code in WiredTigerKVEngine::WiredTigerKVEngine():

        ss << "verbose=(recovery_progress),";
        ss << "verbose=(checkpoint_progress),";
 
        if (shouldLog(::mongo::logger::LogComponent::kStorageRecovery,
                      logger::LogSeverity::Debug(3))) {
            ss << "verbose=(recovery),";
        }

If a configuration option is repeated, verbose=(recovery_progress),verbose=(checkpoint_progress), the last option overwrites the prior options.

So, in this case, we would never put verbose output for recovery-progress. If the above if-condition is true "verbose=(recovery)" will overwrite other verbose types.

It is best to construct a verbose option string of the following form:

verbose=[recovery_progress,checkpoint_progress,recovery]

It is worthwhile evaluating if there are other WT options that might be getting overwritten and ignored like the above case.



 Comments   
Comment by Githook User [ 21/Jun/19 ]

Author:

{'name': 'Zach Yam', 'username': 'zachyam', 'email': 'zach.yam@mongodb.com'}

Message: SERVER-41352 Incorrect verbose configuration in the wiredtiger connection string

(cherry picked from commit 99e7f57e7e5eb63f22e2b582a10e78c197b835e6)
Branch: v4.2
https://github.com/mongodb/mongo/commit/a96d4f23f20fb34244a299a1e9008689e96af346

Comment by Githook User [ 18/Jun/19 ]

Author:

{'name': 'Zach Yam', 'email': 'zach.yam@mongodb.com', 'username': 'zachyam'}

Message: SERVER-41352 Incorrect verbose configuration in the wiredtiger connection string
Branch: master
https://github.com/mongodb/mongo/commit/99e7f57e7e5eb63f22e2b582a10e78c197b835e6

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