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

athenad: ensure no duplicate items in upload queue with snapshot approach #34192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Dec 9, 2024

This update improves performance and thread safety in the uploadFilesToUrls function. Instead of repeatedly calling listUploadQueue() within the loop, it captures a snapshot of the upload queue’s URLs at the beginning of the function. This snapshot is then used to check for duplicates, preventing the addition of items that are being taken from the upload queue by the upload_handler thread during the loop.

this approach improves stability, boosts efficiency, and reduces lock contention from repeated queue locking within the loop.

@deanlee deanlee marked this pull request as ready for review December 9, 2024 15:23
Copy link
Contributor

This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity.

@github-actions github-actions bot added the stale label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant