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

[FIXED] Do not warn if consumer replicas configured to 0 #3882

Merged
merged 1 commit into from Feb 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion server/stream.go
Expand Up @@ -5111,7 +5111,9 @@ func (mset *stream) checkConsumerReplication() {
s, acc := mset.srv, mset.acc
for _, o := range mset.consumers {
o.mu.RLock()
if mset.cfg.Replicas != o.cfg.Replicas {
// Consumer replicas 0 can be a legit config for the replicas and we will inherit from the stream
// when this is the case.
if mset.cfg.Replicas != o.cfg.Replicas && o.cfg.Replicas != 0 {
s.Errorf("consumer '%s > %s > %s' MUST match replication (%d vs %d) of stream with interest policy",
acc, mset.cfg.Name, o.cfg.Name, mset.cfg.Replicas, o.cfg.Replicas)
}
Expand Down