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

Fix live restore migrating newly created files

    • Storage Engines, Storage Engines - Persistence
    • 5
    • StorEng - 2025-03-14, StorEng - 2025-03-28

      SERVER-99614 describes a scenario where schema alter fails with EBUSY as a result of a newly created table being considered dirty. Live restore dirties tables periodically and at the end of the background migration process. Howevever when newly created files are checkpointed they fake the checkpoint here:

          /*
           * If an object has never been used (in other words, if it could become a bulk-loaded file),
           * then we must fake the checkpoint. This is good because we don't write physical checkpoint
           * blocks for just-created files, but it's not just a good idea. The reason is because deleting
           * a physical checkpoint requires writing the file, and fake checkpoints can't write the file.
           * If you (1) create a physical checkpoint for an empty file which writes blocks, (2) start
           * bulk-loading records into the file, (3) during the bulk-load perform another checkpoint with
           * the same name; in order to keep from having two checkpoints with the same name you would have
           * to use the bulk-load's fake checkpoint to delete a physical checkpoint, and that will end in
           * tears.
           */
          if (is_checkpoint && btree->original) {
              __wt_checkpoint_tree_reconcile_update(session, &ta);
      
              fake_ckpt = true;
              goto fake;
          }
      

      We need to fix live restore to ensure the metadata is written without having to dirty the tree.

            Assignee:
            sean.watt@mongodb.com Sean Watt
            Reporter:
            sean.watt@mongodb.com Sean Watt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: