Skip to content

Add configurable backup snapshot fetching from primary#7695

Draft
Copilot wants to merge 19 commits intomainfrom
copilot/add-snapshot-fetching-feature
Draft

Add configurable backup snapshot fetching from primary#7695
Copilot wants to merge 19 commits intomainfrom
copilot/add-snapshot-fetching-feature

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

  • Add backup snapshot fetch feature with BackupSnapshotFetch task, snapshot evidence hook, config plumbing, and e2e test
  • Remove max_size from backup snapshot fetch configuration
  • Add target_rpc_interface config to backup snapshot fetch
  • Fix C++ formatting (clang-format) in configuration.h and node_state.h

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 3 commits March 3, 2026 11:54
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Copilot AI changed the title [WIP] Add configurable snapshot fetching for backup nodes Add configurable backup snapshot fetching from primary Mar 3, 2026
@achamayou
Copy link
Member

@copilot drop the max_size constraint and configuration, it is not necessary here.

Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 3, 2026

@copilot drop the max_size constraint and configuration, it is not necessary here.

Removed max_size from the BackupFetch config struct, JSON serialization, config schema, and CHANGELOG. The underlying fetch_from_peer call now uses std::numeric_limits<size_t>::max() instead. Done in 3b9c163.

@achamayou
Copy link
Member

@copilot ok actually we need one more thing in the configuration here: the name of the rpc_interface to use on the target node to download the snapshot. That has to be used when grabbing the network details of the primary from the KK to attempt the fetch from it in the BackupSnapshotFetch task. We can't just take the first interface, it may not have the SnapshotRead feature enabled on it.

Copilot AI and others added 2 commits March 4, 2026 19:59
The BackupSnapshotFetch task now looks up the primary's RPC interface
by name (configured via target_rpc_interface) instead of using the
first available interface. This ensures the correct interface with
SnapshotRead enabled is used for downloading snapshots.

Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot ok actually we need one more thing in the configuration here: the name of the rpc_interface to use on the target node to download the snapshot. That has to be used when grabbi...

Added target_rpc_interface field to BackupFetch config (default: "primary_rpc_interface"). The BackupSnapshotFetch task now looks up the primary's interface by this configured name via rpc_interfaces.find() instead of using the first available interface. Done in 388c734.

@achamayou
Copy link
Member

@copilot run ./scripts/ci-checks.sh -f to format the code

Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 5, 2026

@copilot run ./scripts/ci-checks.sh -f to format the code

Fixed C++ formatting in configuration.h (multi-line macro args) and node_state.h (line length). Python files were already clean. Done in df810b9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants