[DOCS-7270] Document the procedure for changing the value of journalCompressor Created: 26/Feb/16  Updated: 30/Oct/23  Resolved: 15/Apr/19

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Dmitry Ryabtsev Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-55208 Remove support for nojournal Closed
Participants:
Days since reply: 4 years, 43 weeks, 2 days ago
Epic Link: DOCSP-1769

 Description   

It is an issue because the journalCompressor cannot be changed as easy as blockCompressor. For example if you change journalCompressor from "snappy" (default) to "none", the server will not be able to start.

The server needs to use the journal during the recovery phase, but if the journalCompressor's value does not match the compressor the journal was originally created with, the server will fail to read the journal and hence the recovery cannot be done:

2016-02-25T18:44:58.184+1100 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_max=4),statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=none),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2016-02-25T18:44:58.222+1100 E STORAGE  [initandlisten] WiredTiger (-31802) [1456386298:222607][9973:0x7f403ff60bc0]: log_read: Compressed record with no configured compressor: WT_ERROR: non-specific WiredTiger error
2016-02-25T18:44:58.227+1100 I -        [initandlisten] Assertion: 28595:-31802: WT_ERROR: non-specific WiredTiger error
2016-02-25T18:44:58.228+1100 I STORAGE  [initandlisten] exception in initAndListen: 28595 -31802: WT_ERROR: non-specific WiredTiger error, terminating
2016-02-25T18:44:58.228+1100 I CONTROL  [initandlisten] dbexit:  rc: 100

This is how it should be performed (the journal will be dropped and re-created as a result):

  1. shutdown the mongod process; the shutdown should be clean (db.shutdownServer()) to make sure that recovery phase will not be needed; otherwise the data may be left inconsistent after the step (2) is taken.
  2. restart mongod with the --nojournal option set
  3. shutdown mongod
  4. restart mongod with new journalCompressor option and with "--nojournal" unset

We need to have this procedure documented and linked where storage.wiredTiger.engineConfig.journalCompressor (configuration file option) and --journalCompressor are described.



 Comments   
Comment by Githook User [ 15/Apr/19 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'Kay Kim', 'username': 'kay-kim'}

Message: DOCS-7270,DOCS-12495: changing value of journalCompressor
Branch: v4.0
https://github.com/mongodb/docs/commit/a8c5baa7828672c13b6c0fc463d0a7a373149d6a

Comment by Githook User [ 15/Apr/19 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'Kay Kim', 'username': 'kay-kim'}

Message: DOCS-7270,DOCS-12495: changing value of journalCompressor
Branch: master
https://github.com/mongodb/docs/commit/476bb07c93e364d7d61665c50334955f4d24c985

Comment by Kay Kim (Inactive) [ 10/Apr/19 ]

The downgrade from 4.2 instructions for zstd journal compressor will need the same 4.0/4.2 procedure.

Since the 4.2 downgrade instructions for zstd journal compressor are currently in CR, will
update that procedure with the start as standalone/--nojournal

At the end of that CR, will apply patches to the 4.0/4.2 branches for the manage journaling tutorial as well.

Comment by Githook User [ 10/Apr/19 ]

Author:

{'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}

Message: DOCS-7270,DOCS-12495: changing value of journalCompressor
Branch: v3.6
https://github.com/mongodb/docs/commit/88bd207dd54fab9b632d86a944bbe67ef8d73a64

Comment by Githook User [ 08/Apr/19 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'Kay Kim', 'username': 'kay-kim'}

Message: DOCS-7270,DOCS-12495: changing value of journalCompressor
Branch: master
https://github.com/mongodb/docs/commit/1aef356ead94ee0d12b4c043e4d8700a543e2601

Generated at Thu Feb 08 07:53:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.