mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +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.
|
// Stop CDC service.
|
||||||
s.cdcServer.Stop()
|
s.cdcServer.Stop()
|
||||||
|
|
||||||
// Stop etcd
|
// Don't close s.etcdCli here because it's a shared instance from kvfactory.
|
||||||
if s.etcdCli != nil {
|
// The kvfactory.CloseEtcdClient() will be called in roles.go to close it properly.
|
||||||
if err := s.etcdCli.Close(); err != nil {
|
|
||||||
log.Warn("cdc stop etcd client failed", zap.Error(err))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Info("cdc stop done")
|
log.Info("cdc stop done")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user