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

detect corrupted state in case app dies during middle of shuffile_migrate #2

Open
adammoody opened this issue Jun 12, 2019 · 1 comment

Comments

@adammoody
Copy link
Contributor

adammoody commented Jun 12, 2019

Currently, shuffile_migrate overwrites files in place when moving data. This is useful to conserve storage space, and it is necessary in the case of only being able to fit a single dataset in cache at a time.

However, in introduces a significant risk in that one has corrupt files during the time that shuffile_migrate is executing. If an application dies during that time, the files may be left in a corrupt state.

We should add logic to detect this condition and return an error to notify the user. If using er, the er library does its own tracking to detect this condition. However, we should add something for apps that may be using shuffile directly without going through the er component.

@adammoody
Copy link
Contributor Author

One could set a CORRUPT flag just before starting the migrate in the shuffile metadata file. After completing, one could update this flag to VALID. If when calling migrate() one finds the flag is already set to CORRUPT, then one must assume the files were left in a corrupt state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant