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

Core: delete temp metadata file when version already exists #11350

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

leesf
Copy link

@leesf leesf commented Oct 18, 2024

When using HadoopCatalog, renameToFinal would fail with version already exists exception, we should also delete the temp metadata file in this case.

@github-actions github-actions bot added the core label Oct 18, 2024
@leesf
Copy link
Author

leesf commented Oct 18, 2024

@rdblue please help to review this PR, thanks.

throw new CommitFailedException("Version %d already exists: %s", nextVersion, dst);
CommitFailedException cfe =
new CommitFailedException("Version %d already exists: %s", nextVersion, dst);
RuntimeException re = tryDelete(src);
Copy link
Contributor

Choose a reason for hiding this comment

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

is it always correct to delete the src file or could there be cases where we'd want to keep it?

Copy link
Author

Choose a reason for hiding this comment

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

@nastra yes, i think it is always safe to delete the temp src file(temp metadata file), the commit retry would create a new temp metadata file.

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.

2 participants