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

Old downloads provided after deletion and replacement #312

Closed
HebaruSan opened this issue Jul 22, 2020 · 2 comments · Fixed by #324
Closed

Old downloads provided after deletion and replacement #312

HebaruSan opened this issue Jul 22, 2020 · 2 comments · Fixed by #324
Labels
Area: Backend Related to the Python code that runs inside gunicorn Priority: Normal Type: Bug

Comments

@HebaruSan
Copy link
Contributor

HebaruSan commented Jul 22, 2020

Description (What went wrong?)

If a mod author deletes a release and re-uploads a changed file with the same version number, downloading that release gives the old file for a while (exact interval uncertain).

Reproduction Steps (What did you do?)

Investigation of KSP-CKAN/NetKAN#8055 revealed:

Timestamp Event
2020-07-21T08:01:46 Original upload
2020-07-21T08:49:53 Replacement upload
2020-07-21T09:13 Latest download by CKAN bot, still the old file! (timestamp reported by techman83)
2020-07-22T13:13 New file retrieved after manual client cache purge

The CKAN bot caches its downloads, and it compares release dates to its own local timestamps and purges files if they're stale. That's why the timestamp in the cache was 24 minutes after the second upload. CKAN's already doing everything it can to keep up to date, but SpaceDock is serving stale files.

Download caching is done by Apache Traffic Server, and it has no way of knowing whether a given file is stale.

Expected Behavior (What do you think should have happened instead?)

Downloading the file after T08:49 should have given the newer file.

Extra Information (Screenshots/Error Messages/Javascript Console Output)

Related to #184.

@DasSkelett
Copy link
Member

Because I have it, a nice screenshot of the bug in action:
cache-wrong-file
Look at the file sizes. The frontend immediately gets the new file size, but ATS still returns the old file with a different size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Backend Related to the Python code that runs inside gunicorn Priority: Normal Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants