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

Ensure that accesses queue is empty when calling trackAccess #177

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

kyri-petrou
Copy link
Contributor

This seems like a bug to me. I think the only reason that it hasn't been reported is that it only really affects the outcome of .size under heavy contention for a very short period of time until the next time we call trackAccess(). Still, better to fix it.

Essentially we need to ensure that the queue is truly empty before we exit the trackAccess() method, as there is a chance another thread added an item by the time we finished draining the queue and until updating.set(false) is called

@kyri-petrou kyri-petrou merged commit eabe8ec into series/2.x Feb 24, 2025
27 checks passed
@kyri-petrou kyri-petrou deleted the check-queue-state-after-track-access branch February 24, 2025 12:26
@guizmaii
Copy link
Member

@kyri-petrou @ghostdogpr Will you make a new release with your fixes?

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.

3 participants