Summary
Extract the five hot-backup fields from _wt_connection_impl into a new WT_CONN_BACKUP sub-structure. This follows the purpose-based modularisation pattern established by the SPM-3483 epic (see WT-17491, WT-17493, WT-17495 as prior examples). incr_granularity and incr_backups are incremental-backup specific and remain on _wt_connection_impl.
Fields to extract
From lines 843-848 of src/include/connection.h:
- WT_RWLOCK hot_backup_lock → lock (Hot backup serialization)
- wt_shared uint64_t hot_backup_start → start (Clock value of most recent checkpoint needed by hot backup)
- wt_timestamp_t hot_backup_timestamp → timestamp (Stable timestamp of checkpoint for the open backup)
- char **hot_backup_list → list (Hot backup file list)
- uint32_t *partial_backup_remove_ids → partial_remove_ids (Remove btree id list for partial backup)
Access pattern: conn->backup.<field>
Tasks
- Define struct _wt_conn_backup in src/include/connection.h (alphabetically among WT_CONN* structs)
- Add forward declaration and typedef in src/include/wt_internal.h alphabetically among WT_CONN_* entries
- Replace the 5 individual fields in __wt_connection_impl with a single WT_CONN_BACKUP backup member
- Update src/conn/conn_handle.c: add init/destroy helpers _wti_conn_backup_init / wti_conn_backup_destroy following the pattern of _wti_conn_prefetch_init (
WT-17496) - Update src/conn/conn_api.c and all backup-related source files to use conn->backup.<field>
- Update the macro in connection.h (around line 640) that references hot_backup_timestamp, hot_backup_start, and hot_backup_list
- Regenerate src/include/extern.h via dist/prototypes.py after adding the new helper functions
- Run cd dist && bash s_fast and fix any formatting issues (commit separately)
- Build with ninja wt and confirm zero warnings
Definition of Done
- WT_CONN_BACKUP structure defined in connection.h containing the 5 hot-backup fields above
- All fields removed from __wt_connection_impl and replaced with a single backup member
- All references updated: conn->hot_backup_lock → conn->backup.lock, conn->hot_backup_list → conn->backup.list, etc.
- _wti_conn_backup_init / _wti_conn_backup_destroy helpers added following the established pattern
- Code compiles cleanly with no warnings
- grep confirms no stale references to old field names remain
- is related to
-
WT-17491 Extract extension interface lists into WT_CONN_EXTENSIONS structure
-
- Closed
-
-
WT-17493 Extract tiered storage thread fields into WT_CONN_TIERED structure
-
- Closed
-
-
WT-17495 Extract handle sweep thread fields into WT_CONN_SWEEP structure
-
- Closed
-
-
WT-17496 Extract prefetch queue and thread fields into WT_CONN_PREFETCH structure
-
- Closed
-