Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
wenhuiZilliz committed Aug 6, 2024
1 parent 797c4b7 commit 66ffe17
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/dbclient/milvus2x.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func NewMilvus2xClient(cfg *config.Milvus2xConfig) (*Milvus2x, error) {
zap.Int("GrpcMaxCallRecvMsgSize", cfg.GrpcMaxRecvMsgSize),
zap.Int("GrpcMaxCallSendMsgSize", cfg.GrpcMaxSendMsgSize))

if cfg.Database != "" && len(cfg.Database) > 0 {
if cfg.Database != "" {
err = useDatabase(cfg, milvus, ctx)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion core/loader/cus_milvus2x_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (this *CustomMilvus2xLoader) compareResult(ctx context.Context) error {
func (this *CustomMilvus2xLoader) BatchWrite(ctx context.Context, data *milvus2x.Milvus2xData) error {

log.LL(ctx).Info("[Loader] Begin to batchWrite data to milvus", zap.String("collection", this.runtimeCollectionNames[0]))
if this.cfg.TargetMilvus2xCfg.WriteMode != "" && this.cfg.TargetMilvus2xCfg.WriteMode == common.UPSERT {
if this.cfg.TargetMilvus2xCfg.WriteMode == common.UPSERT {
return this.CusMilvus2x.StartBatchUpsert(ctx, this.runtimeCollectionNames[0], data)
} else {
return this.CusMilvus2x.StartBatchInsert(ctx, this.runtimeCollectionNames[0], data)
Expand Down
2 changes: 1 addition & 1 deletion storage/milvus2x/milvus2_3_ver.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func _createMilvus23VerClient(cfg *config.Milvus2xConfig) (*Milvus23VerClient, e
zap.Int("GrpcMaxCallRecvMsgSize", cfg.GrpcMaxRecvMsgSize),
zap.Int("GrpcMaxCallSendMsgSize", cfg.GrpcMaxSendMsgSize))

if cfg.Database != "" && len(cfg.Database) > 0 {
if cfg.Database != "" {
err := milvus.UsingDatabase(ctx, cfg.Database)
if err != nil {
return nil, err
Expand Down

0 comments on commit 66ffe17

Please sign in to comment.