diff --git a/internal/proxy/impl.go b/internal/proxy/impl.go index 491713cb2e..7382247652 100644 --- a/internal/proxy/impl.go +++ b/internal/proxy/impl.go @@ -2959,9 +2959,7 @@ func (node *Proxy) search(ctx context.Context, request *milvuspb.SearchRequest) mustUsePartitionKey: Params.ProxyCfg.MustUsePartitionKey.GetAsBool(), } - guaranteeTs := request.GuaranteeTimestamp - - log := log.Ctx(ctx).With( + log := log.Ctx(ctx).With( // TODO: it might cause some cpu consumption zap.String("role", typeutil.ProxyRole), zap.String("db", request.DbName), zap.String("collection", request.CollectionName), @@ -2970,14 +2968,15 @@ func (node *Proxy) search(ctx context.Context, request *milvuspb.SearchRequest) zap.Any("len(PlaceholderGroup)", len(request.PlaceholderGroup)), zap.Any("OutputFields", request.OutputFields), zap.Any("search_params", request.SearchParams), - zap.Uint64("guarantee_timestamp", guaranteeTs), + zap.String("ConsistencyLevel", request.GetConsistencyLevel().String()), zap.Bool("useDefaultConsistency", request.GetUseDefaultConsistency()), ) defer func() { span := tr.ElapseSpan() if span >= paramtable.Get().ProxyCfg.SlowQuerySpanInSeconds.GetAsDuration(time.Second) { - log.Info(rpcSlow(method), zap.Int64("nq", qt.SearchRequest.GetNq()), zap.Duration("duration", span)) + log.Info(rpcSlow(method), zap.Uint64("guarantee_timestamp", qt.GetGuaranteeTimestamp()), + zap.Int64("nq", qt.SearchRequest.GetNq()), zap.Duration("duration", span)) metrics.ProxySlowQueryCount.WithLabelValues( strconv.FormatInt(paramtable.GetNodeID(), 10), metrics.SearchLabel, @@ -3162,22 +3161,20 @@ func (node *Proxy) hybridSearch(ctx context.Context, request *milvuspb.HybridSea mustUsePartitionKey: Params.ProxyCfg.MustUsePartitionKey.GetAsBool(), } - guaranteeTs := request.GuaranteeTimestamp - log := log.Ctx(ctx).With( zap.String("role", typeutil.ProxyRole), zap.String("db", request.DbName), zap.String("collection", request.CollectionName), zap.Any("partitions", request.PartitionNames), zap.Any("OutputFields", request.OutputFields), - zap.Uint64("guarantee_timestamp", guaranteeTs), + zap.String("ConsistencyLevel", request.GetConsistencyLevel().String()), zap.Bool("useDefaultConsistency", request.GetUseDefaultConsistency()), ) defer func() { span := tr.ElapseSpan() if span >= paramtable.Get().ProxyCfg.SlowQuerySpanInSeconds.GetAsDuration(time.Second) { - log.Info(rpcSlow(method), zap.Duration("duration", span)) + log.Info(rpcSlow(method), zap.Uint64("guarantee_timestamp", qt.GetGuaranteeTimestamp()), zap.Duration("duration", span)) metrics.ProxySlowQueryCount.WithLabelValues( strconv.FormatInt(paramtable.GetNodeID(), 10), metrics.HybridSearchLabel, @@ -3433,6 +3430,7 @@ func (node *Proxy) query(ctx context.Context, qt *queryTask) (*milvuspb.QueryRes zap.String("db", request.DbName), zap.String("collection", request.CollectionName), zap.Strings("partitions", request.PartitionNames), + zap.String("ConsistencyLevel", request.GetConsistencyLevel().String()), zap.Bool("useDefaultConsistency", request.GetUseDefaultConsistency()), ) @@ -3441,7 +3439,6 @@ func (node *Proxy) query(ctx context.Context, qt *queryTask) (*milvuspb.QueryRes zap.String("expr", request.Expr), zap.Strings("OutputFields", request.OutputFields), zap.Uint64("travel_timestamp", request.TravelTimestamp), - zap.Uint64("guarantee_timestamp", request.GuaranteeTimestamp), ) tr := timerecord.NewTimeRecorder(method) @@ -3454,7 +3451,7 @@ func (node *Proxy) query(ctx context.Context, qt *queryTask) (*milvuspb.QueryRes zap.String("expr", request.Expr), zap.Strings("OutputFields", request.OutputFields), zap.Uint64("travel_timestamp", request.TravelTimestamp), - zap.Uint64("guarantee_timestamp", request.GuaranteeTimestamp), + zap.Uint64("guarantee_timestamp", qt.GetGuaranteeTimestamp()), zap.Duration("duration", span)) metrics.ProxySlowQueryCount.WithLabelValues( strconv.FormatInt(paramtable.GetNodeID(), 10),