fix: restore decrease max_fragment_id in manifest#5554
fix: restore decrease max_fragment_id in manifest#5554majin1102 merged 5 commits intolance-format:mainfrom
Conversation
a9f2bf5 to
dacace3
Compare
Code ReviewSummaryThis PR fixes a bug where AnalysisThe fix is correct and important. The
The fix approach is sound: Taking the max of the restored and current manifest's P1 Issues
// Instead of:
dataset_v1.restore().await.unwrap();
let restored_max = dataset_v1.manifest.max_fragment_id().unwrap_or(0);
// Consider:
dataset_v1.restore().await.unwrap();
let restored_dataset = Dataset::open(test_uri).await.unwrap();
let restored_max = restored_dataset.manifest.max_fragment_id().unwrap_or(0);Otherwise the test may pass even if the fix doesn't work correctly, since you're checking the old version 1 manifest, not the newly created restored manifest. Overall this is a good bug fix for an important invariant. Please verify the test is checking the correct manifest. |
Code ReviewSummaryThis PR fixes a bug where restoring an older version of a dataset could decrease P0 Issue -
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
wjones127
left a comment
There was a problem hiding this comment.
Thanks for doing this. Since we ruled out issues with branches, I agree we just need to fix restore. This solution looks good to me.
Just have some minor suggestions for the tests.
Co-authored-by: Will Jones <willjones127@gmail.com>
Co-authored-by: Will Jones <willjones127@gmail.com>
Code ReviewSummary: This PR fixes a bug where Assessment: LGTM ✓The fix is correct and minimal. The approach of taking the max of the restored manifest's Minor suggestions (non-blocking):
The test coverage is appropriate for this bug fix. |
Code ReviewSummary: This PR fixes a bug where restoring an older version could decrease AssessmentThe fix is correct and well-tested. The approach ensures that when restoring from an old manifest, the No P0 or P1 issues found. Minor observation (not blocking):
|
Code ReviewP0: Bug - Type mismatch between
|
Related: lance-format#5540 --------- Co-authored-by: majin.nathan <majin.nathan@bytedance.com> Co-authored-by: Will Jones <willjones127@gmail.com>
Related: lance-format#5540 --------- Co-authored-by: majin.nathan <majin.nathan@bytedance.com> Co-authored-by: Will Jones <willjones127@gmail.com>
Related: #5540