Skip to content

Commit

Permalink
Add ignore partition param log
Browse files Browse the repository at this point in the history
Signed-off-by: SimFG <bang.fu@zilliz.com>
  • Loading branch information
SimFG committed Nov 28, 2023
1 parent 47a5305 commit dfe8cc2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/writer/milvus_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ func (m *MilvusDataHandler) DropCollection(ctx context.Context, param *api.DropC
func (m *MilvusDataHandler) Insert(ctx context.Context, param *api.InsertParam) error {
partitionName := param.PartitionName
if m.ignorePartition {
log.Info("ignore partition name in insert request", zap.String("partition", partitionName))
partitionName = ""
}
return m.milvusOp(ctx, param.Database, func(milvus client.Client) error {
Expand All @@ -124,6 +125,7 @@ func (m *MilvusDataHandler) Insert(ctx context.Context, param *api.InsertParam)
func (m *MilvusDataHandler) Delete(ctx context.Context, param *api.DeleteParam) error {
partitionName := param.PartitionName
if m.ignorePartition {
log.Info("ignore partition name in delete request", zap.String("partition", partitionName))
partitionName = ""
}

Expand All @@ -134,6 +136,7 @@ func (m *MilvusDataHandler) Delete(ctx context.Context, param *api.DeleteParam)

func (m *MilvusDataHandler) CreatePartition(ctx context.Context, param *api.CreatePartitionParam) error {
if m.ignorePartition {
log.Warn("ignore create partition", zap.String("collection", param.CollectionName), zap.String("partition", param.PartitionName))
return nil
}
return m.milvusOp(ctx, param.Database, func(milvus client.Client) error {
Expand All @@ -143,6 +146,7 @@ func (m *MilvusDataHandler) CreatePartition(ctx context.Context, param *api.Crea

func (m *MilvusDataHandler) DropPartition(ctx context.Context, param *api.DropPartitionParam) error {
if m.ignorePartition {
log.Warn("ignore drop partition", zap.String("collection", param.CollectionName), zap.String("partition", param.PartitionName))
return nil
}
return m.milvusOp(ctx, param.Database, func(milvus client.Client) error {
Expand Down

0 comments on commit dfe8cc2

Please sign in to comment.