Skip to content

Commit

Permalink
Remove noisy log line (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
neekolas authored Feb 27, 2024
1 parent b49b8ef commit 9428056
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions pkg/api/message/v1/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,6 @@ func (s *Service) Query(ctx context.Context, req *proto.QueryRequest) (*proto.Qu
log = log.With(zap.String("topic_type", topic.Category(req.ContentTopics[0])))
}
log = log.With(logging.QueryParameters(req))
if req.StartTimeNs != 0 || req.EndTimeNs != 0 {
ri := apicontext.NewRequesterInfo(ctx)
log.Info("query with time filters", append(
ri.ZapFields(),
zap.Uint64("start_time", req.StartTimeNs),
zap.Uint64("end_time", req.EndTimeNs),
)...)
}

if req.PagingInfo != nil && req.PagingInfo.Cursor != nil {
cursor := req.PagingInfo.Cursor.GetIndex()
Expand All @@ -375,11 +367,7 @@ func (s *Service) Query(ctx context.Context, req *proto.QueryRequest) (*proto.Qu

func (s *Service) BatchQuery(ctx context.Context, req *proto.BatchQueryRequest) (*proto.BatchQueryResponse, error) {
log := s.log.Named("batchQuery")
logFunc := log.Debug
if len(req.Requests) > 10 {
logFunc = log.Info
}
logFunc("large batch query", zap.Int("num_queries", len(req.Requests)))
log.Debug("batch query", zap.Int("num_queries", len(req.Requests)))

// NOTE: in our implementation, we implicitly limit batch size to 50 requests (maxQueriesPerBatch = 50)
if len(req.Requests) > maxQueriesPerBatch {
Expand Down

0 comments on commit 9428056

Please sign in to comment.