Skip to content

Commit

Permalink
Add isL0,SkipDiskQuotaCheck option in Bulkinsert API
Browse files Browse the repository at this point in the history
Signed-off-by: wayblink <[email protected]>
  • Loading branch information
wayblink committed Aug 14, 2024
1 parent 93f6e5c commit 4c6ab63
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions client/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ package client

import (
"fmt"
"strconv"

"github.com/cockroachdb/errors"

Expand Down Expand Up @@ -270,6 +271,24 @@ func IsBackup() BulkInsertOption {
}
}

// IsL0 specifies it is to import L0 segment binlog
func IsL0(isL0 bool) BulkInsertOption {
return func(req *milvuspb.ImportRequest) {
optionMap := entity.KvPairsMap(req.GetOptions())
optionMap["l0_import"] = strconv.FormatBool(isL0)
req.Options = entity.MapKvPairs(optionMap)
}
}

// SkipDiskQuotaCheck https://github.com/milvus-io/milvus/pull/35274
func SkipDiskQuotaCheck(skipDiskQuotaCheck bool) BulkInsertOption {
return func(req *milvuspb.ImportRequest) {
optionMap := entity.KvPairsMap(req.GetOptions())
optionMap["skip_disk_quota_check"] = strconv.FormatBool(skipDiskQuotaCheck)
req.Options = entity.MapKvPairs(optionMap)
}
}

type getOption struct {
partitionNames []string
outputFields []string
Expand Down

0 comments on commit 4c6ab63

Please sign in to comment.