enhace: optimize alter collection log print (#31275)

issue: https://github.com/milvus-io/milvus/issues/31142

Signed-off-by: sunby <sunbingyi1992@gmail.com>
This commit is contained in:
Bingyi Sun 2024-03-18 15:19:06 +08:00 committed by GitHub
parent bdc70dfc6a
commit 992cb6a532
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 4 deletions

View File

@ -1049,7 +1049,8 @@ func (node *Proxy) AlterCollection(ctx context.Context, request *milvuspb.AlterC
log := log.Ctx(ctx).With(
zap.String("role", typeutil.ProxyRole),
zap.String("db", request.DbName),
zap.String("collection", request.CollectionName))
zap.String("collection", request.CollectionName),
zap.Any("props", request.Properties))
log.Info(
rpcReceived(method))

View File

@ -259,7 +259,7 @@ func (b *ServerBroker) GetSegmentIndexState(ctx context.Context, collID UniqueID
}
func (b *ServerBroker) BroadcastAlteredCollection(ctx context.Context, req *milvuspb.AlterCollectionRequest) error {
log.Info("broadcasting request to alter collection", zap.String("collectionName", req.GetCollectionName()), zap.Int64("collectionID", req.GetCollectionID()))
log.Info("broadcasting request to alter collection", zap.String("collectionName", req.GetCollectionName()), zap.Int64("collectionID", req.GetCollectionID()), zap.Any("props", req.GetProperties()))
colMeta, err := b.s.meta.GetCollectionByID(ctx, req.GetDbName(), req.GetCollectionID(), typeutil.MaxTimestamp, false)
if err != nil {
@ -291,7 +291,7 @@ func (b *ServerBroker) BroadcastAlteredCollection(ctx context.Context, req *milv
if resp.ErrorCode != commonpb.ErrorCode_Success {
return errors.New(resp.Reason)
}
log.Info("done to broadcast request to alter collection", zap.String("collectionName", req.GetCollectionName()), zap.Int64("collectionID", req.GetCollectionID()))
log.Info("done to broadcast request to alter collection", zap.String("collectionName", req.GetCollectionName()), zap.Int64("collectionID", req.GetCollectionID()), zap.Any("props", req.GetProperties()))
return nil
}

View File

@ -1272,7 +1272,8 @@ func (c *Core) AlterCollection(ctx context.Context, in *milvuspb.AlterCollection
log.Ctx(ctx).Info("received request to alter collection",
zap.String("role", typeutil.RootCoordRole),
zap.String("name", in.GetCollectionName()))
zap.String("name", in.GetCollectionName()),
zap.Any("props", in.Properties))
t := &alterCollectionTask{
baseTask: newBaseTask(ctx, c),