If a database is opened in read-only mode and the WiredTiger.basecfg specifies that the database has statistics logging enabled WiredTiger will crash. This happens as statistics logging is attempting to create a new statistics file. As such we should disable statistics logging in read-only mode.
One workaround is to modify the WiredTiger.basecfg file to remove the statistics logging configuration. In theory we could stop storing that in the basecfg however that seems like it may have a number of unintended side affects.
This impacts debugging quite often as running the WT utility in read only mode produces this assertion 9/10 times while debugging test_checkpoint failures.
Assertion:
[1634504339:338569][11806:0x7f227adfd700], wt, statlog-server: __wt_open, 244: lock_file || !LF_ISSET(WT_FS_OPEN_CREATE) [1634504339:354363][11806:0x7f227adfd700], wt, statlog-server: __wt_abort, 28: aborting WiredTiger library
Scope:
- Design a solution to prevent creation of Statistics file on open
- Implement the solution
- Write a test to validate