empiredan opened a new pull request, #2416:
URL: https://github.com/apache/incubator-pegasus/pull/2416

   ### What problem does this PR solve?
   
   A corrupted RocksDB MANIFEST can prevent a Pegasus replica from opening even 
when many SST files are still readable. Operators need an offline way to 
salvage the readable records and verify the rebuilt replica before using it.
   
   ### What is changed and how does it work?
   
   - Add `local_replica_recover` to Pegasus shell. It first reads the source 
through the RocksDB DB view; if the DB cannot open, it scans SST files 
individually and writes a new replica with the data and metadata column 
families, `.app-info`, and `.init-info`.
   - Write `sst_recovery_report.txt` with per-file counts and reasons for 
skipped or partially scanned SSTs.
   - Add `local_replica_check` to Pegasus shell and a standalone 
`pegasus_replica_checker` binary. They validate replica layout and metadata, 
open the rebuilt RocksDB, and optionally verify SST files and checksums.
   
   SST fallback is best effort: without the DB's merged view, overwritten or 
deleted values may reappear. The report identifies unreadable files, but a 
recovered replica should be compared with a healthy replica or backup before it 
is used.
   
   ### Checklist
   
   - [x] Manual test: recovered a corrupted replica backup through SST 
fallback; `local_replica_check --verify_checksum` reported `Summary: PASS` on 
the rebuilt replica.
   - [x] `git diff --check` passes.
   - [ ] Build in this checkout (CMake is unavailable in the current 
environment).
   
   Cherry-picked from `ca2f933c7418a8468159e879a41d2cf1c0be05b3`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to