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

Retry shelving a file if the file size on /stacks doesn't match the original file #5191

Closed
andrewjbtw opened this issue Oct 16, 2024 · 0 comments · Fixed by sul-dlss/purl-fetcher#935
Assignees

Comments

@andrewjbtw
Copy link

(This issue comes out of discussion on #5187)

If a file is being shelved and the process fails before the file has been copied fully to Stacks, retry shelving that file. Currently, if the shelving operation is cut off in progress, the copy of the file on Stacks is truncated. This results in Stacks serving a broken file via embed.

Suggestion from @justinlittman in Slack:

One possible approach to preventing this is to have https://github.com/sul-dlss/purl-fetcher/blob/main/app/services/files_by_md5_service.rb also check the file size. Currently, it omits a file if the file doesn't exist on disk; it could also omit if the file's size didn't match. This would cause check_stacks to fail when publishing (https://github.com/sul-dlss/dor-services-app/blob/main/app/services/publish/metadata_transfer_service.rb#L27) and would cause the file to be recopied when retrying.

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