Skip to content

Commit

Permalink
Remove statszRateLimit by setting to 0 just for tests to avoid flappe…
Browse files Browse the repository at this point in the history
…rs. (#5557)

Signed-off-by: Derek Collison <derek@nats.io>
  • Loading branch information
derekcollison committed Jun 18, 2024
2 parents acdb457 + 7eb28f5 commit 3b1b38e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ func (s *Server) sendStatsz(subj string) {
s.sendInternalMsg(subj, _EMPTY_, &m.Server, &m)
}

// Limit updates to the heartbeat interval, max one second.
// Limit updates to the heartbeat interval, max one second by default.
func (s *Server) limitStatsz(subj string) bool {
s.mu.Lock()
defer s.mu.Unlock()
Expand Down
2 changes: 1 addition & 1 deletion server/jetstream_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func init() {
lostQuorumCheck = 4 * hbInterval

// For statz and jetstream placement speedups as well.
statszRateLimit = time.Millisecond * 100
statszRateLimit = 0
}

// Used to setup clusters of clusters for tests.
Expand Down

0 comments on commit 3b1b38e

Please sign in to comment.