Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Remove log messages in happy hot paths #3300

Merged
merged 4 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions go/pkg/log/repository/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ func (r *LogRepository) GetAllCollectionInfoToCompact(ctx context.Context, minCo
}
if err != nil {
trace_log.Error("Error in getting collections to compact from record_log table", zap.Error(err))
} else {
trace_log.Info("Got collections to compact from record_log table", zap.Int("collectionCount", len(collectionToCompact)))
}
return
}
Expand Down Expand Up @@ -195,7 +193,6 @@ func (r *LogRepository) GarbageCollection(ctx context.Context) error {
}
}
if len(collectionsToGC) > 0 {
trace_log.Info("Collections to be garbage collected", zap.Strings("collections", collectionsToGC))
var tx pgx.Tx
tx, err = r.conn.BeginTx(ctx, pgx.TxOptions{})
if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions go/pkg/sysdb/grpc/collection_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ func (s *Server) GetCollections(ctx context.Context, req *coordinatorpb.GetColle
collectionpb := convertCollectionToProto(collection)
res.Collections = append(res.Collections, collectionpb)
}
log.Info("GetCollections succeeded", zap.Any("response", res.Collections), zap.Stringp("collection_id", collectionID), zap.Stringp("collection_name", collectionName))
return res, nil
}

Expand Down Expand Up @@ -248,7 +247,6 @@ func (s *Server) UpdateCollection(ctx context.Context, req *coordinatorpb.Update
return res, grpcutils.BuildInternalGrpcError(err.Error())
}

log.Info("UpdateCollection succeeded", zap.String("collection_id", collectionID))
return res, nil
}

Expand Down Expand Up @@ -298,6 +296,5 @@ func (s *Server) FlushCollectionCompaction(ctx context.Context, req *coordinator
CollectionVersion: flushCollectionInfo.CollectionVersion,
LastCompactionTime: flushCollectionInfo.TenantLastCompactionTime,
}
log.Info("FlushCollectionCompaction succeeded", zap.String("collection_id", req.CollectionId), zap.Int32("collection_version", req.CollectionVersion), zap.Int64("log_position", req.LogPosition))
return res, nil
}
2 changes: 0 additions & 2 deletions go/pkg/sysdb/grpc/segment_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ func (s *Server) GetSegments(ctx context.Context, req *coordinatorpb.GetSegments
segmentpbList = append(segmentpbList, segmentpb)
}
res.Segments = segmentpbList
log.Info("GetSegments success", zap.String("request", req.String()), zap.String("response", res.String()))
return res, nil
}

Expand Down Expand Up @@ -131,6 +130,5 @@ func (s *Server) UpdateSegment(ctx context.Context, req *coordinatorpb.UpdateSeg
log.Error("UpdateSegment failed", zap.Error(err), zap.String("request", req.String()))
return res, grpcutils.BuildInternalGrpcError(err.Error())
}
log.Info("UpdateSegment success", zap.String("request", req.String()))
return res, nil
}
3 changes: 0 additions & 3 deletions go/pkg/sysdb/grpc/tenant_database_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func (s *Server) GetDatabase(ctx context.Context, req *coordinatorpb.GetDatabase
Name: database.Name,
Tenant: database.Tenant,
}
log.Info("GetDatabase success", zap.String("request", req.String()))
return res, nil
}

Expand Down Expand Up @@ -89,7 +88,6 @@ func (s *Server) GetTenant(ctx context.Context, req *coordinatorpb.GetTenantRequ
res.Tenant = &coordinatorpb.Tenant{
Name: tenant.Name,
}
log.Info("GetTenant success", zap.String("request", req.String()))
return res, nil
}

Expand Down Expand Up @@ -117,6 +115,5 @@ func (s *Server) GetLastCompactionTimeForTenant(ctx context.Context, req *coordi
LastCompactionTime: tenant.LastCompactionTime,
})
}
log.Info("GetLastCompactionTimeForTenant success", zap.String("request", req.String()))
return res, nil
}
2 changes: 0 additions & 2 deletions go/pkg/sysdb/metastore/db/dao/segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ func (s *segmentDb) GetSegments(id types.UniqueID, segmentType *string, scope *s
metadata = append(metadata, segmentMetadata)
currentSegment.SegmentMetadata = metadata
}
log.Info("get segments success", zap.Any("segments", segments))
return segments, nil
}

Expand Down Expand Up @@ -212,7 +211,6 @@ func (s *segmentDb) Update(in *dbmodel.UpdateSegment) error {
}

func (s *segmentDb) RegisterFilePaths(flushSegmentCompactions []*model.FlushSegmentCompaction) error {
log.Info("register file paths", zap.Any("flushSegmentCompactions", flushSegmentCompactions))
for _, flushSegmentCompaction := range flushSegmentCompactions {
filePaths, err := json.Marshal(flushSegmentCompaction.FilePaths)
if err != nil {
Expand Down
2 changes: 0 additions & 2 deletions go/pkg/sysdb/metastore/db/dao/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func (s *tenantDb) Insert(tenant *dbmodel.Tenant) error {
}

func (s *tenantDb) UpdateTenantLastCompactionTime(tenantID string, lastCompactionTime int64) error {
log.Info("UpdateTenantLastCompactionTime", zap.String("tenantID", tenantID), zap.Int64("lastCompactionTime", lastCompactionTime))
var tenants []dbmodel.Tenant
result := s.db.Model(&tenants).
Clauses(clause.Returning{Columns: []clause.Column{{Name: "id"}}}).
Expand All @@ -86,7 +85,6 @@ func (s *tenantDb) UpdateTenantLastCompactionTime(tenantID string, lastCompactio
}

func (s *tenantDb) GetTenantsLastCompactionTime(tenantIDs []string) ([]*dbmodel.Tenant, error) {
log.Info("GetTenantsLastCompactionTime", zap.Any("tenantIDs", tenantIDs))
var tenants []*dbmodel.Tenant

result := s.db.Select("id", "last_compaction_time").Find(&tenants, "id IN ?", tenantIDs)
Expand Down
1 change: 0 additions & 1 deletion rust/worker/src/log/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ impl GrpcLog {
match response {
Ok(response) => {
let collections = response.into_inner().all_collection_info;
println!("Log got collections with new data: {:?}", collections);
let mut result = Vec::new();
for collection in collections {
let collection_uuid = match Uuid::parse_str(&collection.collection_id) {
Expand Down
Loading