Skip to content

Commit

Permalink
NRG: Don't send metaleader snapshot as normal entry on leader change …
Browse files Browse the repository at this point in the history
…if apply queue is not empty

Signed-off-by: Neil Twigg <neil@nats.io>

fix
  • Loading branch information
neilalexander committed Feb 1, 2024
1 parent 9c738ec commit 14a814c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/jetstream_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ func (js *jetStream) monitorCluster() {

case isLeader = <-lch:
// For meta layer synchronize everyone to our state on becoming leader.
if isLeader {
if isLeader && n.ApplyQ().len() == 0 {
n.SendSnapshot(js.metaSnapshot())
}
// Process the change.
Expand Down

0 comments on commit 14a814c

Please sign in to comment.