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

buf_file: Skip and delete broken file chunks during resume. fix #1760 #1874

Merged
merged 2 commits into from
Mar 2, 2018

Conversation

repeatedly
Copy link
Member

@repeatedly repeatedly commented Feb 28, 2018

On k8s environment, we received the report "file chunks are unexpectedly broken and it causes error loop during resume."
This patch mitigates this problem by ignoring broken chunks in resume.


def handle_broken_files(path, mode, e)
log.error "found broken chunk file during resume. Deleted corresponding files:", :path => path, :mode => mode, :err_msg => e.message
# After support 'backup_dir' feature, these files are moved to backup_dir instead of unlink.
Copy link
Member Author

Choose a reason for hiding this comment

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

backup_dir's issue is here: #1856

@mururu
Copy link
Member

mururu commented Mar 1, 2018

Looks good. If you push tests in this PR. I'll also see it.

@mururu
Copy link
Member

mururu commented Mar 1, 2018

minor comment: It seems better to prepare a method for path + '.meta'.

@repeatedly
Copy link
Member Author

Add tests

Copy link
Member

@mururu mururu left a comment

Choose a reason for hiding this comment

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

Looks good.

@repeatedly repeatedly merged commit 5c7c32a into master Mar 2, 2018
@repeatedly repeatedly deleted the ignore-broken-file-chunks branch March 2, 2018 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants