Fix querycoord metrics (#20429)

Signed-off-by: longjiquan <jiquan.long@zilliz.com>

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
pull/20425/head
Jiquan Long 2022-11-09 17:45:04 +08:00 committed by GitHub
parent cc9dc0f0fa
commit 854fb6aad2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -296,6 +296,12 @@ func (s *Server) initObserver() {
)
}
func (s *Server) afterStart() {
now := time.Now()
Params.QueryCoordCfg.CreatedTime = now
Params.QueryCoordCfg.UpdatedTime = now
}
func (s *Server) Start() error {
log.Info("start watcher...")
sessions, revision, err := s.session.GetSessions(typeutil.QueryNodeRole)
@ -348,6 +354,8 @@ func (s *Server) Start() error {
}
log.Info("QueryCoord started")
s.afterStart()
return nil
}