Extract hot backup fields into WT_CONN_BACKUP structure

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Backup
    • None
    • Storage Engines, Storage Engines - Persistence
    • 0.395
    • SE Persistence backlog
    • None

      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_locklock (Hot backup serialization)
      • wt_shared uint64_t hot_backup_startstart (Clock value of most recent checkpoint needed by hot backup)
      • wt_timestamp_t hot_backup_timestamptimestamp (Stable timestamp of checkpoint for the open backup)
      • char **hot_backup_listlist (Hot backup file list)
      • uint32_t *partial_backup_remove_idspartial_remove_ids (Remove btree id list for partial backup)

      Access pattern: conn->backup.<field>

      Tasks

      1. Define struct _wt_conn_backup in src/include/connection.h (alphabetically among WT_CONN* structs)
      2. Add forward declaration and typedef in src/include/wt_internal.h alphabetically among WT_CONN_* entries
      3. Replace the 5 individual fields in __wt_connection_impl with a single WT_CONN_BACKUP backup member
      4. 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)
      5. Update src/conn/conn_api.c and all backup-related source files to use conn->backup.<field>
      6. Update the macro in connection.h (around line 640) that references hot_backup_timestamp, hot_backup_start, and hot_backup_list
      7. Regenerate src/include/extern.h via dist/prototypes.py after adding the new helper functions
      8. Run cd dist && bash s_fast and fix any formatting issues (commit separately)
      9. 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_lockconn->backup.lock, conn->hot_backup_listconn->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

            Assignee:
            Etienne Petrel
            Reporter:
            Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: