-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Storage Engines
-
StorEng - Refinement Pipeline
Summary
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:
- Does not run recovery.
- When opening a cursor, automatically open a checkpoint cursor.
Motivation
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.