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

PLAT-604 [queue] create Stats (to replace PendingCount) #161

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

philandstuff
Copy link
Contributor

This is just like #160, but we calculate length and pending count atomically.

Before this change, I was subtracting the pending count from the length to get a "waiting messages" metric; but as these numbers could not be measured atomically I sometimes saw negative waiting messages.

This changes PendingCount() into Stats() which returns both length and pending count.

This is just like #160, but we calculate length and pending count atomically.

Before this change, I was subtracting the pending count from the length to get a
"waiting messages" metric; but as these numbers could not be measured atomically
I sometimes saw negative waiting messages.

This changes PendingCount() into Stats() which returns both length and pending
count.
@philandstuff philandstuff requested a review from a team as a code owner December 10, 2024 14:22
@philandstuff philandstuff merged commit 5828335 into main Dec 10, 2024
2 checks passed
@philandstuff philandstuff deleted the queue-stats branch December 10, 2024 15:11
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.

1 participant