Fix querynode consume ts lag metrics (#24119)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2023-05-16 09:59:26 +08:00 committed by GitHub
parent 836b862dd7
commit df7848cf79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,7 @@ import (
"github.com/milvus-io/milvus/pkg/mq/msgstream"
"github.com/milvus-io/milvus/pkg/util/merr"
"github.com/milvus-io/milvus/pkg/util/paramtable"
"github.com/milvus-io/milvus/pkg/util/tsoutil"
"github.com/milvus-io/milvus/pkg/util/typeutil"
)
@ -67,7 +68,7 @@ func (fNode *filterNode) Operate(in Msg) Msg {
metrics.QueryNodeConsumeTimeTickLag.
WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), metrics.InsertLabel, fmt.Sprint(fNode.collectionID)).
Set(float64(streamMsgPack.EndTs))
Set(float64(tsoutil.SubByNow(streamMsgPack.EndTs)))
//Get collection from collection manager
collection := fNode.manager.Collection.Get(fNode.collectionID)