mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Fixed an off by one bug that under certain circumstances could cause large consumer replica states.
This could lead to instability in the system. The bug would manifest in replicated consumers when certain messages could be acked out of order, and, the pending list would never go to zero. Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2021 The NATS Authors
|
||||
// Copyright 2019-2023 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
@@ -52,14 +52,6 @@ func RunRandClientPortServer() *Server {
|
||||
return RunServer(&opts)
|
||||
}
|
||||
|
||||
// Used to setup clusters of clusters for tests.
|
||||
type cluster struct {
|
||||
servers []*Server
|
||||
opts []*Options
|
||||
name string
|
||||
t testing.TB
|
||||
}
|
||||
|
||||
func require_True(t *testing.T, b bool) {
|
||||
t.Helper()
|
||||
if !b {
|
||||
@@ -276,6 +268,11 @@ func (c *cluster) shutdown() {
|
||||
if c == nil {
|
||||
return
|
||||
}
|
||||
// Stop any proxies.
|
||||
for _, np := range c.nproxies {
|
||||
np.stop()
|
||||
}
|
||||
// Shutdown and cleanup servers.
|
||||
for i, s := range c.servers {
|
||||
sd := s.StoreDir()
|
||||
s.Shutdown()
|
||||
|
||||
Reference in New Issue
Block a user