diff --git a/internal/querycoord/metrics_info.go b/internal/querycoord/metrics_info.go index 5b31cf69ca..8a6dbdbb92 100644 --- a/internal/querycoord/metrics_info.go +++ b/internal/querycoord/metrics_info.go @@ -50,8 +50,9 @@ func getSystemInfoMetrics( SystemVersion: os.Getenv(metricsinfo.GitCommitEnvKey), DeployMode: os.Getenv(metricsinfo.DeployModeEnvKey), }, - // TODO(dragondriver): CreatedTime & UpdatedTime, easy but time-costing - Type: typeutil.QueryCoordRole, + CreatedTime: Params.CreatedTime.String(), + UpdatedTime: Params.UpdatedTime.String(), + Type: typeutil.QueryCoordRole, }, SystemConfigurations: metricsinfo.QueryCoordConfiguration{ SearchChannelPrefix: Params.SearchChannelPrefix, diff --git a/internal/querycoord/param_table.go b/internal/querycoord/param_table.go index 97cb2926c8..a92703480b 100644 --- a/internal/querycoord/param_table.go +++ b/internal/querycoord/param_table.go @@ -16,6 +16,7 @@ import ( "strconv" "strings" "sync" + "time" "github.com/milvus-io/milvus/internal/log" "github.com/milvus-io/milvus/internal/util/paramtable" @@ -57,6 +58,9 @@ type ParamTable struct { MinioSecretAccessKey string MinioUseSSLStr bool MinioBucketName string + + CreatedTime time.Time + UpdatedTime time.Time } // Params are variables of the ParamTable type diff --git a/internal/querycoord/query_coord.go b/internal/querycoord/query_coord.go index 9a0d65bd4e..9fdb5dfc43 100644 --- a/internal/querycoord/query_coord.go +++ b/internal/querycoord/query_coord.go @@ -135,6 +135,10 @@ func (qc *QueryCoord) Init() error { func (qc *QueryCoord) Start() error { qc.scheduler.Start() log.Debug("start scheduler ...") + + Params.CreatedTime = time.Now() + Params.UpdatedTime = time.Now() + qc.UpdateStateCode(internalpb.StateCode_Healthy) qc.loopWg.Add(1)