-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic in deltalake_core::kernel::snapshot::log_segment::list_log_files_with_checkpoint::{{closure}}
#2290
Comments
@cmackenzie1 can you check against the latest version of main, this should already have been fixed by: #2270 |
@ion-elgreco - does that address the underlying problem that the assert in this function only allows 1 checkpoint to exist in the log after the current checkpoint version? Can a table not have multiple checkpoints created after the current version in a multi-writer scenario? Maybe I don't understand what this function is really trying to do here. let checkpoint_files = files
.iter()
.filter_map(|f| {
if f.location.is_checkpoint_file() && f.location.commit_version() == Some(cp.version) {
Some(f.clone())
} else {
None
}
})
.collect_vec();
// TODO raise a proper error
assert_eq!(checkpoint_files.len(), cp.parts.unwrap_or(1) as usize); |
It does because now it ignores all checkpoint files that are higher than the version that exists in _last. Cp.parts will now be equal to the amount of files also when it's a multipart checkpoint. If for some reason the last checkpoint version did not get updated but you did write a checkpoint parquet then that will now be ignore and not counted as a checkpoint during the validation |
Thanks for the quick response @ion-elgreco! Bear with me while I try to understand this. The functions docstring is delta-rs/crates/core/src/kernel/snapshot/log_segment.rs Lines 413 to 418 in 9812bec
This is what I am struggling to understand. Why are we doing this instead of @roeap could you help me understand the intention (and the TODO) there? |
I can confirm that this assertion still panics after fix for the corrupted tables where
_last_checkpoint:
Error:
I think it may still make sense to return a proper error rather than assertion. |
@esarili do you want to open a PR perhaps to throw a meaningful error? The assertion indeed isn't clear enough if you haven't dived in the code |
@ion-elgreco it is not clear to me what would be a proper error in this case. I can create a PR if someone guides me. |
… sync # Description When a table is corrupted and `_last_checkpoint` file points to a version that has been deleted, `list_log_files_with_checkpoint` function panics. With this change `list_log_files_with_checkpoint` function returns an error allowing callers react to such issues. # Related Issue(s) - delta-io#2290
When a table is corrupted and `_last_checkpoint` file points to a version that has been deleted, `list_log_files_with_checkpoint` function panics. With this change `list_log_files_with_checkpoint` function returns an error allowing callers react to such issues. - delta-io#2290
When a table is corrupted and `_last_checkpoint` file points to a version that has been deleted, `list_log_files_with_checkpoint` function panics. With this change `list_log_files_with_checkpoint` function returns an error allowing callers react to such issues. - delta-io#2290
# Description When a table is corrupted and `_last_checkpoint` file points to a version that has been deleted, `list_log_files_with_checkpoint` function panics. With this change `list_log_files_with_checkpoint` function returns an error allowing callers react to such issues. # Related Issue(s) - #2290
Resolved by #2406 |
Environment
Delta-rs version: 0.17.0
Binding: Rust
Environment:
Bug
What happened:
Panic occurred in
deltalake_core::kernel::snapshot::log_segment::list_log_files_with_checkpoint::{{closure}}
delta-rs/crates/core/src/kernel/snapshot/log_segment.rs
Line 457 in 9812bec
What you expected to happen:
Errors over panics. I am not sure what this assert is trying to validate.
How to reproduce it:
Unsure what happened exactly.
More details:
The text was updated successfully, but these errors were encountered: