Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-7270

Document the procedure for changing the value of journalCompressor

    XMLWordPrintableJSON

Details

    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.

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            dmitry.ryabtsev@mongodb.com Dmitry Ryabtsev
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              4 years, 43 weeks, 2 days ago