enhance: Remove too frequency read ddl log from rootcoord (#28891)

This PR removed too frequency log for such
`DescribeCollection/ShowPartition` operation from root coord

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
wei liu 2023-12-04 09:42:33 +08:00 committed by GitHub
parent 20fc90c591
commit 6718986a5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1056,8 +1056,6 @@ func (c *Core) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequ
log := log.Ctx(ctx).With(zap.String("collectionName", in.GetCollectionName()),
zap.Uint64("ts", ts))
log.Info("received request to has collection")
t := &hasCollectionTask{
baseTask: newBaseTask(ctx, c),
Req: in,
@ -1084,8 +1082,6 @@ func (c *Core) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequ
metrics.RootCoordDDLReqLatency.WithLabelValues("HasCollection").Observe(float64(tr.ElapseSpan().Milliseconds()))
metrics.RootCoordDDLReqLatencyInQueue.WithLabelValues("HasCollection").Observe(float64(t.queueDur.Milliseconds()))
log.Info("done to has collection", zap.Bool("exist", t.Rsp.GetValue()))
return t.Rsp, nil
}
@ -1144,10 +1140,6 @@ func (c *Core) describeCollectionImpl(ctx context.Context, in *milvuspb.Describe
zap.Uint64("ts", ts),
zap.Bool("allowUnavailable", allowUnavailable))
// TODO(longjiquan): log may be very frequent here.
log.Info("received request to describe collection")
t := &describeCollectionTask{
baseTask: newBaseTask(ctx, c),
Req: in,
@ -1175,8 +1167,6 @@ func (c *Core) describeCollectionImpl(ctx context.Context, in *milvuspb.Describe
metrics.RootCoordDDLReqLatency.WithLabelValues("DescribeCollection").Observe(float64(tr.ElapseSpan().Milliseconds()))
metrics.RootCoordDDLReqLatencyInQueue.WithLabelValues("DescribeCollection").Observe(float64(t.queueDur.Milliseconds()))
log.Info("done to describe collection", zap.Int64("collection_id", t.Rsp.GetCollectionID()))
return t.Rsp, nil
}
@ -1210,8 +1200,6 @@ func (c *Core) ShowCollections(ctx context.Context, in *milvuspb.ShowCollections
log := log.Ctx(ctx).With(zap.String("dbname", in.GetDbName()),
zap.Uint64("ts", ts))
log.Info("received request to show collections")
t := &showCollectionTask{
baseTask: newBaseTask(ctx, c),
Req: in,
@ -1238,8 +1226,6 @@ func (c *Core) ShowCollections(ctx context.Context, in *milvuspb.ShowCollections
metrics.RootCoordDDLReqLatency.WithLabelValues("ShowCollections").Observe(float64(tr.ElapseSpan().Milliseconds()))
metrics.RootCoordDDLReqLatencyInQueue.WithLabelValues("ShowCollections").Observe(float64(t.queueDur.Milliseconds()))
log.Info("done to show collections", zap.Int("num of collections", len(t.Rsp.GetCollectionNames()))) // maybe very large, print number instead.
return t.Rsp, nil
}
@ -1416,8 +1402,6 @@ func (c *Core) HasPartition(ctx context.Context, in *milvuspb.HasPartitionReques
zap.String("partition", in.GetPartitionName()),
zap.Uint64("ts", ts))
log.Info("received request to has partition")
t := &hasPartitionTask{
baseTask: newBaseTask(ctx, c),
Req: in,
@ -1444,8 +1428,6 @@ func (c *Core) HasPartition(ctx context.Context, in *milvuspb.HasPartitionReques
metrics.RootCoordDDLReqLatency.WithLabelValues("HasPartition").Observe(float64(tr.ElapseSpan().Milliseconds()))
metrics.RootCoordDDLReqLatencyInQueue.WithLabelValues("HasPartition").Observe(float64(t.queueDur.Milliseconds()))
log.Info("done to has partition", zap.Bool("exist", t.Rsp.GetValue()))
return t.Rsp, nil
}
@ -1464,8 +1446,6 @@ func (c *Core) showPartitionsImpl(ctx context.Context, in *milvuspb.ShowPartitio
zap.Strings("partitions", in.GetPartitionNames()),
zap.Bool("allowUnavailable", allowUnavailable))
log.Info("received request to show partitions")
t := &showPartitionTask{
baseTask: newBaseTask(ctx, c),
Req: in,
@ -1495,8 +1475,6 @@ func (c *Core) showPartitionsImpl(ctx context.Context, in *milvuspb.ShowPartitio
metrics.RootCoordDDLReqLatency.WithLabelValues("ShowPartitions").Observe(float64(tr.ElapseSpan().Milliseconds()))
metrics.RootCoordDDLReqLatencyInQueue.WithLabelValues("ShowPartitions").Observe(float64(t.queueDur.Milliseconds()))
log.Info("done to show partitions", zap.Strings("partitions", t.Rsp.GetPartitionNames()))
return t.Rsp, nil
}