br: support experimental full snapshot restore through RestoreRegion
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Feature Request
**Is your feature request related to a problem? Please describe:**
BR full snapshot restore currently drives the Store Download/MultiIngest pipeline. Restoring classic snapshot SSTs into a cloud storage engine target needs a caller for the Region-leader RestoreRegion RPC, so Workers can prepare the source SSTs and the Store can apply the output.
**Describe the feature you'd like:**
Provide an opt-in first-phase path for NextGen BR full snapshot restore from S3-compatible storage into newly created tables on a compatible CSE target. Reuse metadata/schema creation, key rewriting, Region splitting/scattering, progress and checksum infrastructure. Send source write/default SST descriptors and shared storage/cipher configuration to each Region leader, and report success only after the RPC completion.
A failed RPC may already have applied. This phase must not automatically replay successful Regions or resume an existing checkpoint. Retry/deduplication, resume, failure recovery and performance tuning require follow-up work.
**Describe alternatives you've considered:**
Keep the existing Download/MultiIngest path as the default. Wrapping RestoreRegion in the existing whole-file-group retry would risk repeating Regions that have already applied.
**Teachability, Documentation, Adoption, Migration Strategy:**
Expose a default-off `--experimental-restore-region` option. Reject unsupported restore modes, rate limiting and checkpoint resume with actionable errors. Include deterministic backup fixtures and raw-command/component-identity capture for manual validation.
Protocol dependency: https://github.com/pingcap/kvproto/pull/1533. This issue tracks the BR first phase; it does not claim production readiness or support for automatic retry.
Contributor guide
Research direction
No repository files or tests are named in the issue. Start by reading the existing Download/MultiIngest path and the linked kvproto RestoreRegion dependency, then trace how metadata, schema creation, Region splitting, progress, and checksums are handled. Done means a default-off option supports the specified first-phase restore, rejects unsupported modes and resume, and reports success only after RestoreRegion completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100