mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 09:08:43 +08:00
fix: Fix panic when gracefully stopping cdc (#45094)
issue: https://github.com/milvus-io/milvus/issues/45093, https://github.com/milvus-io/milvus/issues/44123 Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
parent
511a04a6a5
commit
b045efc2bd
@ -91,12 +91,8 @@ func (s *Server) stop() {
|
||||
// Stop CDC service.
|
||||
s.cdcServer.Stop()
|
||||
|
||||
// Stop etcd
|
||||
if s.etcdCli != nil {
|
||||
if err := s.etcdCli.Close(); err != nil {
|
||||
log.Warn("cdc stop etcd client failed", zap.Error(err))
|
||||
}
|
||||
}
|
||||
// Don't close s.etcdCli here because it's a shared instance from kvfactory.
|
||||
// The kvfactory.CloseEtcdClient() will be called in roles.go to close it properly.
|
||||
|
||||
log.Info("cdc stop done")
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user