fix: Use server ctx instead of loopCtx for datacoord LivenessCheck (#31691)

See also #31689

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/31647/head
congqixia 2024-03-29 10:37:11 +08:00 committed by GitHub
parent 9750e78f1d
commit fe2f34d76f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ func (s *Server) Register() error {
metrics.NumNodes.WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), typeutil.DataCoordRole).Inc()
log.Info("DataCoord Register Finished")
s.session.LivenessCheck(s.serverLoopCtx, func() {
s.session.LivenessCheck(s.ctx, func() {
logutil.Logger(s.ctx).Error("disconnected from etcd and exited", zap.Int64("serverID", s.session.GetServerID()))
os.Exit(1)
})