mirror of https://github.com/milvus-io/milvus.git
fix: Start `LeaderCacheObserver` before `SyncAll` (#33035)
Related to #33033 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com> Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/33042/head
parent
40e5c0be70
commit
861977ab60
|
@ -457,9 +457,6 @@ func (s *Server) startQueryCoord() error {
|
||||||
log.Warn("querycoord failed to watch proxy", zap.Error(err))
|
log.Warn("querycoord failed to watch proxy", zap.Error(err))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recover dist, to avoid generate too much task when dist not ready after restart
|
|
||||||
s.distController.SyncAll(s.ctx)
|
|
||||||
|
|
||||||
s.startServerLoop()
|
s.startServerLoop()
|
||||||
s.afterStart()
|
s.afterStart()
|
||||||
s.UpdateStateCode(commonpb.StateCode_Healthy)
|
s.UpdateStateCode(commonpb.StateCode_Healthy)
|
||||||
|
@ -468,6 +465,11 @@ func (s *Server) startQueryCoord() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) startServerLoop() {
|
func (s *Server) startServerLoop() {
|
||||||
|
// leader cache observer shall be started before `SyncAll` call
|
||||||
|
s.leaderCacheObserver.Start(s.ctx)
|
||||||
|
// Recover dist, to avoid generate too much task when dist not ready after restart
|
||||||
|
s.distController.SyncAll(s.ctx)
|
||||||
|
|
||||||
// start the components from inside to outside,
|
// start the components from inside to outside,
|
||||||
// to make the dependencies ready for every component
|
// to make the dependencies ready for every component
|
||||||
log.Info("start cluster...")
|
log.Info("start cluster...")
|
||||||
|
@ -478,7 +480,6 @@ func (s *Server) startServerLoop() {
|
||||||
s.targetObserver.Start()
|
s.targetObserver.Start()
|
||||||
s.replicaObserver.Start()
|
s.replicaObserver.Start()
|
||||||
s.resourceObserver.Start()
|
s.resourceObserver.Start()
|
||||||
s.leaderCacheObserver.Start(s.ctx)
|
|
||||||
|
|
||||||
log.Info("start task scheduler...")
|
log.Info("start task scheduler...")
|
||||||
s.taskScheduler.Start()
|
s.taskScheduler.Start()
|
||||||
|
|
Loading…
Reference in New Issue