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

Improve resilience if diff fetch fails or .osc.gz file is corrupted #731

Open
b1tw153 opened this issue Jun 4, 2024 · 1 comment
Open

Comments

@b1tw153
Copy link

b1tw153 commented Jun 4, 2024

If the download of a .osc.gz file is interrupted, this can leave an incomplete file in the diff directory. Then, when apply_osc_to_db.sh attempts to use this file, it will hang and fail to complete the update. At this point, the script will output the following error:

gzip: stdin: unexpected end of file
Reading XML file ...Parse error at line NNNN:
unclosed token

To recover from this scenario, the broken .osc.gz must be re-downloaded manually. The fetch_osc.sh script will not automatically replace it. Then, all of the components must be restarted including the dispatcher processes. If apply_osc_to_db.sh is restarted without restarting the dispatcher, it will still hang and fail to complete the update.

Two fixes would be good. The fetch_osc.sh script could have better protection against interruptions. And the apply_osc_to_db.sh script could handle corrupted .osc.gz files better.

@b1tw153
Copy link
Author

b1tw153 commented Jun 4, 2024

I think this issue should be reproducible by manually truncating a .osc.gz file before it is processed.

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

No branches or pull requests

2 participants