Skip to content

Commit

Permalink
enhance: Support collection name for ProxyDeleteVectors as well
Browse files Browse the repository at this point in the history
Signed-off-by: Reid Chan <[email protected]>
  • Loading branch information
Reidddddd committed Dec 5, 2024
1 parent 051bc28 commit 13692fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion internal/proxy/task_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ func (dt *deleteTask) Execute(ctx context.Context) (err error) {
}

func (dt *deleteTask) PostExecute(ctx context.Context) error {
metrics.ProxyDeleteVectors.WithLabelValues(paramtable.GetStringNodeID(), dt.req.GetDbName()).Add(float64(dt.count))
metrics.ProxyDeleteVectors.WithLabelValues(
paramtable.GetStringNodeID(),
dt.req.GetDbName(),
dt.req.GetCollectionName(),
).Add(float64(dt.count))
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/metrics/proxy_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ var (
Subsystem: typeutil.ProxyRole,
Name: "delete_vectors_count",
Help: "counter of vectors successfully deleted",
}, []string{nodeIDLabelName, databaseLabelName})
}, []string{nodeIDLabelName, databaseLabelName, collectionName})

// ProxySQLatency record the latency of search successfully.
ProxySQLatency = prometheus.NewHistogramVec(
Expand Down

0 comments on commit 13692fb

Please sign in to comment.