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

Fix stat cursor fast path during live restore

    • Storage Engines
    • 3
    • StorEng - 2025-02-04

      There is a fast path in __wt_curstat_table_init to retrieve the size of a table using a syscall without opening the dhandle to avoid table lock contention:

          /*
           * If only gathering table size statistics, try a fast path that avoids the schema and table
           * list locks.
           */
          if (F_ISSET(cst, WT_STAT_TYPE_SIZE)) {
              WT_RET(__curstat_size_only(session, uri, &was_fast, cst));
              if (was_fast)
                  return (0);
          }
      

      This causes live restore to crash as the file is not guaranteed to exist in the destination without opening a live restore file handle.

            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: