JunRuiLee opened a new pull request, #7944:
URL: https://github.com/apache/paimon/pull/7944

   ## Summary
   - Add `TableRepair.repair(dry_run=False)` to fix metadata inconsistencies
   - Currently fixes: LATEST pointing to missing snapshot → rewritten to newest 
valid snapshot
   - Add `repair_table/repair_database/repair_catalog` catalog API with return 
type annotations
   - `FileSystemCatalog` implementation delegating to repair module
   - Per-table error isolation in `repair_database` (continues on individual 
table failures)
   - Fix operation is idempotent: single atomic write, safe to re-run after 
interruption
   
   ## Context
   Split from #7940 following @JingsongLi's [review 
comment](https://github.com/apache/paimon/pull/7940#pullrequestreview-4351628317).
   
   Depends on Part 1: #7943
   - **Part 1**: Read-only verification logic ✅
   - **Part 2 (this PR)**: Fix mode + catalog integration
   - **Part 3**: CLI command (depends on Part 2)
   
   Please merge in order: Part 1 → Part 2 → Part 3.
   
   ## Tests added
   - `test_repair_fix_dangling_latest`: fix mode rewrites LATEST to newest 
valid snapshot
   - `test_dry_run_does_not_modify`: dry_run=True does not change any files
   - `test_repair_database_level`: repairs all tables in a database
   - `test_repair_catalog_level`: repairs all tables across all databases
   - `test_fix_latest_respects_check_data_files`: fix skips snapshots with 
missing data files
   - `test_repair_is_idempotent`: running repair twice converges — second run 
is a no-op


-- 
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]

Reply via email to