Skip to content

Commit

Permalink
Fix compatibility (#202)
Browse files Browse the repository at this point in the history
Signed-off-by: wayblink <anyang.wang@zilliz.com>
  • Loading branch information
wayblink authored Sep 13, 2023
1 parent f8910a6 commit af8704d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/backup_impl_restore_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ func (b *BackupContext) RestoreBackup(ctx context.Context, request *backuppb.Res
}
}
} else if len(request.GetCollectionNames()) == 0 {
toRestoreCollectionBackups = backup.GetCollectionBackups()
for _, collectionBackup := range backup.GetCollectionBackups() {
if collectionBackup.GetDbName() == "" {
collectionBackup.DbName = "default"
}
toRestoreCollectionBackups = append(toRestoreCollectionBackups, collectionBackup)
}
} else {
collectionNameDict := make(map[string]bool)
for _, collectionName := range request.GetCollectionNames() {
Expand All @@ -155,7 +160,6 @@ func (b *BackupContext) RestoreBackup(ctx context.Context, request *backuppb.Res
collectionBackup.DbName = "default"
}
fullCollectionName := collectionBackup.GetDbName() + "." + collectionBackup.GetCollectionName()
collectionBackup.GetCollectionName()
if collectionNameDict[fullCollectionName] {
toRestoreCollectionBackups = append(toRestoreCollectionBackups, collectionBackup)
}
Expand Down

0 comments on commit af8704d

Please sign in to comment.