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

Fix pin check activation #587

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions consumer_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func (q *consumerQuery) matchWaiting(consumers []*Consumer) ([]*Consumer, error)
}

func (q *consumerQuery) matchPinned(consumers []*Consumer) ([]*Consumer, error) {
return q.cbMatcher(consumers, q.isBound != nil, func(consumer *Consumer) bool {
return q.cbMatcher(consumers, q.isPinned != nil, func(consumer *Consumer) bool {
if !consumer.IsPinnedClientPriority() {
return false
}
Expand All @@ -313,7 +313,7 @@ func (q *consumerQuery) matchPinned(consumers []*Consumer) ([]*Consumer, error)
pinned++
}
}
isPinned := pinned == len(nfo.PriorityGroups)
isPinned := pinned == len(nfo.Config.PriorityGroups)

return (!q.invert && isPinned) || (q.invert && !isPinned)
})
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/jedib0t/go-pretty/v6 v6.6.1
github.com/klauspost/compress v1.17.11
github.com/nats-io/jwt/v2 v2.7.2
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20241113003423-e1b2f5d9854d
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20241119025009-2dadd723643c
github.com/nats-io/nats.go v1.37.0
github.com/nats-io/nkeys v0.4.7
github.com/nats-io/nuid v1.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/nats-io/jwt/v2 v2.7.2 h1:SCRjfDLJ2q8naXp8YlGJJS5/yj3wGSODFYVi4nnwVMw=
github.com/nats-io/jwt/v2 v2.7.2/go.mod h1:kB6QUmqHG6Wdrzj0KP2L+OX4xiTPBeV+NHVstFaATXU=
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20241113003423-e1b2f5d9854d h1:tT1pVgPadut3ryD7sr+Eh1nMTseYA0FliZ89/TWE8Ew=
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20241113003423-e1b2f5d9854d/go.mod h1:UMry3yQXAiKBN3yh82BS4HxJWF9ht4sbRQyZ1qXODqc=
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20241119025009-2dadd723643c h1:lcnWooJpdDKowjjijNW5LCTGRjInR4rpAecFVXxoOZQ=
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20241119025009-2dadd723643c/go.mod h1:UMry3yQXAiKBN3yh82BS4HxJWF9ht4sbRQyZ1qXODqc=
github.com/nats-io/nats.go v1.37.0 h1:07rauXbVnnJvv1gfIyghFEo6lUcYRY0WXc3x7x0vUxE=
github.com/nats-io/nats.go v1.37.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=
Expand Down
Loading