mirror of https://github.com/milvus-io/milvus.git
Fix metric RootCoordInsertChannelTimeTick (#23236)
Signed-off-by: longjiquan <jiquan.long@zilliz.com>pull/22572/head
parent
2c1c3aecfc
commit
8530dfadb4
|
@ -22,8 +22,6 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
|
||||||
|
|
||||||
"github.com/milvus-io/milvus-proto/go-api/commonpb"
|
"github.com/milvus-io/milvus-proto/go-api/commonpb"
|
||||||
"github.com/milvus-io/milvus-proto/go-api/msgpb"
|
"github.com/milvus-io/milvus-proto/go-api/msgpb"
|
||||||
"github.com/milvus-io/milvus/internal/log"
|
"github.com/milvus-io/milvus/internal/log"
|
||||||
|
@ -35,6 +33,7 @@ import (
|
||||||
"github.com/milvus-io/milvus/internal/util/timerecord"
|
"github.com/milvus-io/milvus/internal/util/timerecord"
|
||||||
"github.com/milvus-io/milvus/internal/util/tsoutil"
|
"github.com/milvus-io/milvus/internal/util/tsoutil"
|
||||||
"github.com/milvus-io/milvus/internal/util/typeutil"
|
"github.com/milvus-io/milvus/internal/util/typeutil"
|
||||||
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -300,6 +299,13 @@ func (t *timetickSync) startWatch(wg *sync.WaitGroup) {
|
||||||
|
|
||||||
// SendTimeTickToChannel send each channel's min timetick to msg stream
|
// SendTimeTickToChannel send each channel's min timetick to msg stream
|
||||||
func (t *timetickSync) sendTimeTickToChannel(chanNames []string, ts typeutil.Timestamp) error {
|
func (t *timetickSync) sendTimeTickToChannel(chanNames []string, ts typeutil.Timestamp) error {
|
||||||
|
func() {
|
||||||
|
sub := tsoutil.SubByNow(ts)
|
||||||
|
for _, chanName := range chanNames {
|
||||||
|
metrics.RootCoordInsertChannelTimeTick.WithLabelValues(chanName).Set(float64(sub))
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
msgPack := msgstream.MsgPack{}
|
msgPack := msgstream.MsgPack{}
|
||||||
baseMsg := msgstream.BaseMsg{
|
baseMsg := msgstream.BaseMsg{
|
||||||
BeginTimestamp: ts,
|
BeginTimestamp: ts,
|
||||||
|
@ -323,10 +329,6 @@ func (t *timetickSync) sendTimeTickToChannel(chanNames []string, ts typeutil.Tim
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
sub := tsoutil.SubByNow(ts)
|
|
||||||
for _, chanName := range chanNames {
|
|
||||||
metrics.RootCoordInsertChannelTimeTick.WithLabelValues(chanName).Set(float64(sub))
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue