mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
In single server mode healthz could mistake a snapshot staging directory during a restore as an account.
If the restore took a long time, stalled, or was aborted, would cause healthz to fail. Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -3083,6 +3083,9 @@ func (s *Server) healthz(opts *HealthzOptions) *HealthStatus {
|
||||
// Whip through account folders and pull each stream name.
|
||||
fis, _ := os.ReadDir(sdir)
|
||||
for _, fi := range fis {
|
||||
if fi.Name() == snapStagingDir {
|
||||
continue
|
||||
}
|
||||
acc, err := s.LookupAccount(fi.Name())
|
||||
if err != nil {
|
||||
health.Status = na
|
||||
|
||||
Reference in New Issue
Block a user