Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Jira - DGRAPH-1281 and DGRAPH-1282 When the restore is started, we open a badger instance with the provided encryption key and then check if the backup file can be opened using the encryption key. If the backup cannot be opened using the encryption key, we return an error to the user but the badger DB stores the encryption key. When the user tries to restore the same backup to the same badger instance without a key (because backup is unencrypted), badger complaints about the missing key. This PR fixes by opening badger after opening the backup file. This ensures we don't open an encrypted badger db for an unencrypted backup file. (cherry picked from commit 25c37c8)
- Loading branch information