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

Support read-only WT connections with checkpoint cursors only

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Engines
    • StorEng - Refinement Pipeline


      Read-only connections in WiredTiger are not truly read-only: When opening a database, WiredTiger still runs recovery. However, if the user only wants to get a few documents and does not need anything more than a checkpoint cursor on a table with checkpoint-based recovery, recovery is not needed.

      We should thus provide a variant of a read-only connection that:

      1. Does not run recovery.
      2. When opening a cursor, automatically open a checkpoint cursor.



      The goal of this use case is two-fold:

      • Opening a queryable backup spends a lot of time running recovery. If a customer only needs to run a few simple queries on collections, running recovery is not needed. The only time we would need to run recovery is if the server would want to replay the oplog, but the queryable backup feature does not do that.
      • There are several use cases where we would like to use the wt utility on a corrupted database or even a backup, but don't want to run recovery.


      More details

      Opening a database without running recovery, and then insisting that all opened cursors are checkpoint cursors, does not seem like it should be all that difficult. There may be more work needed to truly make the connection read-only, such as to not create WiredTiger.wt when opening a backup. This may be, however, not necessary to provide a quick win for queryable backup. If making the connection truly read-only is too much work, we can split that part into a separate ticket.

            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            peter.macko@mongodb.com Peter Macko
            0 Vote for this issue
            6 Start watching this issue