Skip to content

Commit

Permalink
fix influxd close and reset issue
Browse files Browse the repository at this point in the history
  • Loading branch information
chengshiwen committed Sep 7, 2024
1 parent 5ce4d08 commit 61d0b10
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/influxd/run/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,10 @@ func (s *Server) Close() error {

s.config.deregisterDiagnostics(s.Monitor)

if s.ShardWriter != nil {
s.ShardWriter.Close()
}

if s.PointsWriter != nil {
s.PointsWriter.Close()
}
Expand All @@ -555,6 +559,10 @@ func (s *Server) Close() error {
s.HintedHandoff.Close()
}

if s.MetaExecutor != nil {
s.MetaExecutor.Close()
}

if s.QueryExecutor != nil {
s.QueryExecutor.Close()
}
Expand Down Expand Up @@ -600,7 +608,9 @@ func (s *Server) Reset() error {
s.closing = svr.closing
s.MetaClient = svr.MetaClient
s.TSDBStore = svr.TSDBStore
s.ClusterStore = svr.ClusterStore
s.QueryExecutor = svr.QueryExecutor
s.MetaExecutor = svr.MetaExecutor
s.PointsWriter = svr.PointsWriter
s.ShardWriter = svr.ShardWriter
s.HintedHandoff = svr.HintedHandoff
Expand Down

0 comments on commit 61d0b10

Please sign in to comment.