Skip to content

Commit

Permalink
[FIX]: Empty b.params.MinioCfg.RootPath handler (S3/Ceph) (zilliztech…
Browse files Browse the repository at this point in the history
…#177)

* [FIX]: Empty b.params.MinioCfg.RootPath hadler

Signed-off-by: Gleb Vazhenin <gleb.vazhenin@team.bumble.com>
  • Loading branch information
punkerpunker authored and zhuwenxing committed Feb 21, 2024
1 parent 81e6a28 commit 6bbc578
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions core/backup_impl_create_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,15 @@ func (b *BackupContext) readSegmentInfo(ctx context.Context, collecitonID int64,
NumOfRows: numOfRows,
}
var size int64 = 0
var rootPath string

insertPath := fmt.Sprintf("%s/%s/%v/%v/%v/", b.params.MinioCfg.RootPath, "insert_log", collecitonID, partitionID, segmentID)
if b.params.MinioCfg.RootPath != "" {
rootPath = fmt.Sprintf("%s/", b.params.MinioCfg.RootPath)
} else {
rootPath = ""
}

insertPath := fmt.Sprintf("%s%s/%v/%v/%v/", rootPath, "insert_log", collecitonID, partitionID, segmentID)
log.Debug("insertPath", zap.String("insertPath", insertPath))
fieldsLogDir, _, err := b.getStorageClient().ListWithPrefix(ctx, b.milvusBucketName, insertPath, false)
if err != nil {
Expand All @@ -754,7 +761,7 @@ func (b *BackupContext) readSegmentInfo(ctx context.Context, collecitonID int64,
})
}

deltaLogPath := fmt.Sprintf("%s/%s/%v/%v/%v/", b.params.MinioCfg.RootPath, "delta_log", collecitonID, partitionID, segmentID)
deltaLogPath := fmt.Sprintf("%s%s/%v/%v/%v/", rootPath, "delta_log", collecitonID, partitionID, segmentID)
deltaFieldsLogDir, _, _ := b.getStorageClient().ListWithPrefix(ctx, b.milvusBucketName, deltaLogPath, false)
deltaLogs := make([]*backuppb.FieldBinlog, 0)
for _, deltaFieldLogDir := range deltaFieldsLogDir {
Expand Down

0 comments on commit 6bbc578

Please sign in to comment.