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

Remote file caching improvement is destroyed by use of parse as a validation callback #453

Closed
sirosen opened this issue Jun 27, 2024 · 1 comment · Fixed by #454
Closed
Labels
bug Something isn't working

Comments

@sirosen
Copy link
Member

sirosen commented Jun 27, 2024

I realized this just now in the course of discussing #451. The validation callback parses response data, which results in a download.

The fix will require re-thinking how retries are managed within the CacheDownloader.
It also reveals a gap between unit and acceptance testing, but I'll not worry about that at the moment.

@sirosen
Copy link
Member Author

sirosen commented Jun 27, 2024

The right way to do this is to take the retries out of the streaming request helper and to put them into a broader context.
Basically, the validation callback should only fire if we have a cache miss. And if the validation callback fails, we start doing retries in a tight loop with the validation callback in order to avoid poisoning the cache with unparseable data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant