mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
Remove bad & duplicate metric (#20905)
/kind improvement Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com> Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>
This commit is contained in:
parent
9a42cff9b4
commit
b238f4ee58
@ -23,20 +23,16 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/samber/lo"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/schemapb"
|
||||
"github.com/milvus-io/milvus/internal/common"
|
||||
"github.com/milvus-io/milvus/internal/log"
|
||||
"github.com/milvus-io/milvus/internal/metrics"
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
"github.com/milvus-io/milvus/internal/proto/internalpb"
|
||||
"github.com/milvus-io/milvus/internal/storage"
|
||||
"github.com/milvus-io/milvus/internal/types"
|
||||
"github.com/milvus-io/milvus/internal/util/paramtable"
|
||||
"github.com/milvus-io/milvus/internal/util/typeutil"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type (
|
||||
@ -138,7 +134,6 @@ func (c *ChannelMeta) segmentFlushed(segID UniqueID) {
|
||||
if seg, ok := c.segments[segID]; ok {
|
||||
seg.setType(datapb.SegmentType_Flushed)
|
||||
}
|
||||
metrics.DataNodeNumUnflushedSegments.WithLabelValues(fmt.Sprint(paramtable.GetNodeID())).Dec()
|
||||
}
|
||||
|
||||
// new2NormalSegment transfers a segment from *New* to *Normal*.
|
||||
@ -224,9 +219,6 @@ func (c *ChannelMeta) addSegment(req addSegmentReq) error {
|
||||
c.segMu.Lock()
|
||||
c.segments[req.segID] = seg
|
||||
c.segMu.Unlock()
|
||||
if req.segType == datapb.SegmentType_New || req.segType == datapb.SegmentType_Normal {
|
||||
metrics.DataNodeNumUnflushedSegments.WithLabelValues(fmt.Sprint(paramtable.GetNodeID())).Inc()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -441,7 +433,6 @@ func (c *ChannelMeta) removeSegments(segIDs ...UniqueID) {
|
||||
|
||||
delete(c.segments, segID)
|
||||
}
|
||||
metrics.DataNodeNumUnflushedSegments.WithLabelValues(fmt.Sprint(paramtable.GetNodeID())).Sub(float64(cnt))
|
||||
}
|
||||
|
||||
// hasSegment checks whether this channel has a segment according to segment ID.
|
||||
|
@ -112,16 +112,6 @@ var (
|
||||
collectionIDLabelName,
|
||||
})
|
||||
|
||||
DataNodeNumUnflushedSegments = prometheus.NewGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Namespace: milvusNamespace,
|
||||
Subsystem: typeutil.DataNodeRole,
|
||||
Name: "unflushed_segment_num",
|
||||
Help: "number of unflushed segments",
|
||||
}, []string{
|
||||
nodeIDLabelName,
|
||||
})
|
||||
|
||||
DataNodeEncodeBufferLatency = prometheus.NewHistogramVec( // TODO: arguably
|
||||
prometheus.HistogramOpts{
|
||||
Namespace: milvusNamespace,
|
||||
@ -209,7 +199,7 @@ var (
|
||||
}, []string{nodeIDLabelName})
|
||||
)
|
||||
|
||||
//RegisterDataNode registers DataNode metrics
|
||||
// RegisterDataNode registers DataNode metrics
|
||||
func RegisterDataNode(registry *prometheus.Registry) {
|
||||
registry.MustRegister(DataNodeNumFlowGraphs)
|
||||
registry.MustRegister(DataNodeConsumeMsgRowsCount)
|
||||
@ -217,7 +207,6 @@ func RegisterDataNode(registry *prometheus.Registry) {
|
||||
registry.MustRegister(DataNodeNumConsumers)
|
||||
registry.MustRegister(DataNodeNumProducers)
|
||||
registry.MustRegister(DataNodeConsumeTimeTickLag)
|
||||
registry.MustRegister(DataNodeNumUnflushedSegments)
|
||||
registry.MustRegister(DataNodeEncodeBufferLatency)
|
||||
registry.MustRegister(DataNodeSave2StorageLatency)
|
||||
registry.MustRegister(DataNodeFlushBufferCount)
|
||||
|
Loading…
Reference in New Issue
Block a user