Skip to content
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

[Kernel] Retry _last_checkpoint loading in case of failures #2812

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

vkorukanti
Copy link
Collaborator

Description

Currently, Kernel stops on first failure at loading the _last_checkpoint file (which contains info about the last checkpoint). We should have mechanisms to retry just like how Delta-Spark retries on retryable failures. More details are here.

How was this patch tested?

Added mock unittests

Does this PR introduce any user-facing changes?

Comment on lines -107 to +123
return checkpointRow.map(CheckpointMetaData::fromRow);
if (checkpointRow.isPresent()) {
return Optional.of(CheckpointMetaData.fromRow(checkpointRow.get()));
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the logical difference between these two diffs?

Comment on lines 141 to 143
String msg = String.format("Failed to load checkpoint metadata from file %s. " +
"Retrying after 1sec. (current attempt = %s)",
lastCheckpointFilePath, tries);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: weird formatting / indentation

@vkorukanti vkorukanti merged commit f37dc86 into delta-io:master Mar 28, 2024
7 checks passed
@vkorukanti vkorukanti deleted the loadMetadataKernel branch May 9, 2024 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants