Skip to content

Commit

Permalink
fix cross restore path (#422)
Browse files Browse the repository at this point in the history
Signed-off-by: wayblink <[email protected]>
  • Loading branch information
wayblink authored Sep 9, 2024
1 parent 8d6fa7a commit 8da4717
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
8 changes: 4 additions & 4 deletions core/backup_impl_restore_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,16 +586,16 @@ func (b *BackupContext) executeRestoreCollectionTask(ctx context.Context, backup
if file == "" {
realFiles[i] = file
} else {
tempFilekey := path.Join(tempDir, strings.Replace(file, b.params.MinioCfg.BackupRootPath, "", 1))
log.Debug("Copy temporary restore file", zap.String("from", file), zap.String("to", tempFilekey))
tempFileKey := path.Join(tempDir, strings.Replace(file, b.params.MinioCfg.BackupRootPath, "", 1)) + SEPERATOR
log.Debug("Copy temporary restore file", zap.String("from", file), zap.String("to", tempFileKey))
err := retry.Do(ctx, func() error {
return b.getRestoreCopier().Copy(ctx, file, tempFilekey, backupBucketName, b.milvusBucketName)
return b.getRestoreCopier().Copy(ctx, file, tempFileKey, backupBucketName, b.milvusBucketName)
}, retry.Sleep(2*time.Second), retry.Attempts(5))
if err != nil {
log.Error("fail to copy backup date from backup bucket to restore target milvus bucket after retry", zap.Error(err))
return err
}
realFiles[i] = tempFilekey
realFiles[i] = tempFileKey
}
}
} else {
Expand Down
3 changes: 1 addition & 2 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ const docTemplate = `{
"type": "string",
"description": "collection_name",
"name": "collection_name",
"in": "query",
"required": true
"in": "query"
}
],
"responses": {
Expand Down
3 changes: 1 addition & 2 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@
"type": "string",
"description": "collection_name",
"name": "collection_name",
"in": "query",
"required": true
"in": "query"
}
],
"responses": {
Expand Down
1 change: 0 additions & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,6 @@ paths:
- description: collection_name
in: query
name: collection_name
required: true
type: string
produces:
- application/json
Expand Down

0 comments on commit 8da4717

Please sign in to comment.