mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
When checking replica count when updating retention, make sure stream assignment is set first
Signed-off-by: Neil Twigg <neil@nats.io>
This commit is contained in:
@@ -1787,7 +1787,7 @@ func (mset *stream) updateWithAdvisory(config *StreamConfig, sendAdvisory bool)
|
||||
// a subsequent update to an existing tier will then move from existing past tier to existing new tier
|
||||
}
|
||||
|
||||
if mset.isLeader() && ocfg.Retention != cfg.Retention && cfg.Retention == InterestPolicy {
|
||||
if mset.isLeader() && mset.sa != nil && ocfg.Retention != cfg.Retention && cfg.Retention == InterestPolicy {
|
||||
// Before we can update the retention policy for the consumer, we need
|
||||
// the replica count of all consumers to match the stream.
|
||||
for _, c := range mset.sa.consumers {
|
||||
|
||||
Reference in New Issue
Block a user