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

Change Consumer Priority Group State info and fix pinned TTL #6081

Merged
merged 5 commits into from
Nov 6, 2024

Conversation

Jarema
Copy link
Member

@Jarema Jarema commented Nov 6, 2024

This PR introduces few changes & improvements to Pinned Consumers

Fix pinned TTL timer when its assigned from existing waiting request
Until now, we were resetting Pinned TTL only if pin was set on incoming
Pull Request, but not when we were pinning an existing waiting request.
It also simplifies some logic.

Switch to slice of PriorityGroupState
Previously, we were storing just the pinned IDs, but to be more
future-proof, this commit will switch approach to store a struct.
It also adds PinnedTS which can be useful for debugging pinned consumers.

cc @ripienaar @jnmoyne

Signed-off-by: Tomasz Pietrek tomasz@nats.io

Previously, we were storing just the pinned IDs, but to be more
future-proof, this commit will switch approach to store a struct.

Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
Until now, we were resetting Pinned TTL only if pin was set on incoming
Pull Request, but not when we were pinning an existing waiting request.

Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
@Jarema Jarema requested a review from a team as a code owner November 6, 2024 15:57
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekcollison
Copy link
Member

Let me know if you want to hold on merge til @ripienaar and/or @jnmoyne have a chance to review as well.

@jnmoyne
Copy link
Contributor

jnmoyne commented Nov 6, 2024

Reviewed and tested the changes and they LGTM

@derekcollison derekcollison merged commit e2ece84 into main Nov 6, 2024
5 checks passed
@derekcollison derekcollison deleted the improve-priority-state-and-timer branch November 6, 2024 21:54
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