Skip to content

Comments

Fix 10s minimum time for cache restores#44

Merged
jackieli-tes merged 1 commit intotespkg:mainfrom
welteki:fix-restore-delay
Feb 20, 2024
Merged

Fix 10s minimum time for cache restores#44
jackieli-tes merged 1 commit intotespkg:mainfrom
welteki:fix-restore-delay

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
@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