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

Avoid skipping ranges when looping through queues #720

Merged
merged 1 commit into from
Jul 1, 2022

Conversation

francesmcmullin
Copy link
Contributor

When queues are very full and/or very active, the ruby reaper can't give absolute guarantees because it doesn't run as a single atomic action, but we can eliminate some edge cases.

In this instance, the reaper anticipates that a queue might empty, from the front, in which case ranges need to be adjusted downward to ensure every job is checked. However, in the case where the queue grows (at the back), this calculation of "next_page - (initial_size - current_size))" means skipping over some jobs.

@mhenrixon
Copy link
Owner

Rebasing with master will give you a green build on the first two PRs.

@mhenrixon
Copy link
Owner

Whatever is left is all on you 😋

@mhenrixon mhenrixon enabled auto-merge (squash) June 30, 2022 13:21
auto-merge was automatically disabled June 30, 2022 14:06

Head branch was pushed to by a user without write access

@francesmcmullin
Copy link
Contributor Author

Green now 🎉 🟢 Thanks for the nudge ^_^

@mhenrixon mhenrixon merged commit 4bcc5d1 into mhenrixon:main Jul 1, 2022
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.

2 participants