Fix stat cursor fast path during live restore

XMLWordPrintableJSON

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

      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
            Reporter:
            Sean Watt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: