Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-3772

Hot backup causes uncontrolled growth of WiredTigerPreplog files

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.6.3, 3.7.1, WT3.1.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      WiredTiger engine is not using prepared log files for log file allocation when hot backup is in progress. The relevant logic is implemented in function __log_newfile.
      Due to this logic prep_missed counter is increased which causes log file server thread (__log_file_server) to bump counter log_prealloc. log_prealloc controls number of pre-created log files (WiredTigerPreplog.*).

      So with every new hot backup log_prealloc counter grows more and more thus creating more and more WiredTigerPreplog.* files in journal directory. For example, after a month of daily hot backups we have about 370 prep log files (each of 100MB => 37GB of junk) which I even cannot delete premanently as the log file thread re-creates them to the count of log_prealloc property.

      My proposed solution is not to increment prep_missed counter when hot backup is active since we deliberately not using those prep files.

            sue.loverso@mongodb.com Susan LoVerso
            sturchanov Sergei Turchanov
            0 Vote for this issue
            4 Start watching this issue