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

Fix 10s minimum time for cache restores #44

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

welteki
Copy link
Contributor

@welteki welteki commented Feb 20, 2024

We saw that every cache restore seems to take a minimum of 10s even for small 1MB caches from a local network using Minio or Seaweedfs.

The cause seems to be the listObjects function. It starts a timeout of 10s that is not cleared when the Promise is resolved or rejected. This causes the action to hang for a minimum of 10s even when the restore was faster.

Before fix:

Screenshot 2024-02-20 at 12 37 38

After fix:

Screenshot 2024-02-20 at 12 04 54

Changes

  • Clear the timeout in listObjects when the Promise is resolved or rejected.

Fix Issues

Fixes #43

listObjects caused the cache restore to take a minimum of 10 seconds
because the timeout was not cleared when the Promise is resolved or
rejected.
@jackieli-tes
Copy link
Contributor

The change looks good to me. But I wonder why it worked before....

@jackieli-tes jackieli-tes merged commit cba095d into tespkg:main Feb 20, 2024
21 of 24 checks passed
@alexellis
Copy link

Thanks for the merge and release @jackieli-tes

Do you use this action with ARC or something else?

@welteki welteki deleted the fix-restore-delay branch February 20, 2024 17:25
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

Successfully merging this pull request may close these issues.

🐛 - Seeing 10s minimum time for all cache restores
3 participants