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

Confusing code around backup 'log_only'

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Backup
    • Storage Engines
    • StorEng - Defined Pipeline

      The __backup_config function sets a log_only return variable based on values in a target list (specified by in the config of the backup cursor). The relevant code is basically:

         log_only = false;
         target_list = false;
         for (target_list = false; __wt_config_next(...) == 0; target_list = true) {
             if (WT_PREFIX_MATCH(key, "log:")
                 log_only = !target_list;

      We walk through values specified for "target" in the config, i.e. "target=(file:foo.wt,file:bar.wt,log:xxx.log)"

      The way I read this, if the first item in the list starts with "log:", and there are no other items that are "log:", then log_only will be true. This log_only value influences whether we have a "WiredTiger.isrc" file vs. some other files in the backup. I don't know how "target" is expected to be used, but this seems strange, and the comments do not enlighten.

            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            donald.anderson@mongodb.com Donald Anderson
            0 Vote for this issue
            4 Start watching this issue