Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: yangxuan <[email protected]>
  • Loading branch information
XuanYang-cn committed Dec 17, 2024
1 parent fb7e0a1 commit 6e0bca1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions internal/proxy/task_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,15 +389,10 @@ func (dr *deleteRunner) Init(ctx context.Context) error {
}

func (dr *deleteRunner) Run(ctx context.Context) error {
// Make sure partitionIDs aren't empty
if len(dr.partitionIDs) == 0 {
dr.partitionIDs = []UniqueID{common.AllPartitionsID}
}

isSimple, pk, numRow := getPrimaryKeysFromPlan(dr.schema.CollectionSchema, dr.plan)
if isSimple {
// if could get delete.primaryKeys from delete expr
err := dr.simpleDelete(ctx, pk, numRow, dr.partitionIDs[0])
err := dr.simpleDelete(ctx, pk, numRow)
if err != nil {
return err
}
Expand Down Expand Up @@ -589,7 +584,11 @@ func (dr *deleteRunner) complexDelete(ctx context.Context, plan *planpb.PlanNode
return nil
}

func (dr *deleteRunner) simpleDelete(ctx context.Context, pk *schemapb.IDs, numRow int64, partitionID UniqueID) error {
func (dr *deleteRunner) simpleDelete(ctx context.Context, pk *schemapb.IDs, numRow int64) error {
partitionID := common.AllPartitionsID
if len(dr.partitionIDs) == 1 {
partitionID = dr.partitionIDs[0]
}
log.Ctx.Debug("get primary keys from expr",

Check failure on line 592 in internal/proxy/task_delete.go

View workflow job for this annotation

GitHub Actions / Code Checker MacOS 13

log.Ctx.Debug undefined (type func(ctx "context".Context) *"github.com/milvus-io/milvus/pkg/log".MLogger has no field or method Debug)
zap.Int64("len of primary keys", numRow),
zap.Int64("collectionID", dr.collectionID),
Expand Down

0 comments on commit 6e0bca1

Please sign in to comment.