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

enhance: Add isL0,SkipDiskQuotaCheck option in Bulkinsert API #803

Merged
merged 1 commit into from
Aug 20, 2024
Merged
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
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
Loading