Add Close method for ChannelManager in datacoord (#23493)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/23568/head
congqixia 2023-04-18 17:54:31 +08:00 committed by GitHub
parent b23723535c
commit d83654c33f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -184,6 +184,13 @@ func (c *ChannelManager) Startup(ctx context.Context, nodes []int64) error {
return nil
}
// Close notifies the running checker.
func (c *ChannelManager) Close() {
if c.stopChecker != nil {
c.stopChecker()
}
}
// checkOldNodes processes the existing watch channels when starting up.
// ToWatch get startTs and timeoutTs, start timer
// WatchSuccess ignore

View File

@ -139,4 +139,5 @@ func (c *Cluster) GetSessions() []*Session {
// Close releases resources opened in Cluster
func (c *Cluster) Close() {
c.sessionManager.Close()
c.channelManager.Close()
}