Skip to content

Commit

Permalink
[FIX]: Empty b.params.MinioCfg.RootPath hadler
Browse files Browse the repository at this point in the history
Signed-off-by: Gleb Vazhenin <gleb.vazhenin@team.bumble.com>
  • Loading branch information
Gleb Vazhenin committed Aug 10, 2023
1 parent f276c61 commit 759a600
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion 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 Down

0 comments on commit 759a600

Please sign in to comment.