Skip to content

Commit

Permalink
Only suppress if we know this asset is clustered since we already kno…
Browse files Browse the repository at this point in the history
…w we are the leader.

This allows a restore of an R1 on a cluster to send create advisory just like single server.

Signed-off-by: Derek Collison <derek@nats.io>
  • Loading branch information
derekcollison committed Mar 5, 2022
1 parent 97a3cad commit b6a9d9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/stream.go
Expand Up @@ -464,7 +464,9 @@ func (a *Account) addStreamWithAssignment(config *StreamConfig, fsConfig *FileSt
// Send advisory.
var suppress bool
if !s.standAloneMode() && sa == nil {
suppress = true
if cfg.Replicas > 1 {
suppress = true
}
} else if sa != nil {
suppress = sa.responded
}
Expand Down

0 comments on commit b6a9d9a

Please sign in to comment.