More accurate error status for BackupEngine::Open
Summary: Some users are assuming NotFound means the backup does not exist at the provided path, which is a reasonable assumption. We need to stop returning NotFound for system errors. Depends on #1644 Closes https://github.com/facebook/rocksdb/pull/1645 Differential Revision: D4312233 Pulled By: ajkr fbshipit-source-id: 5343c10
This commit is contained in:
parent
f0c509e2c8
commit
243975d5da
@ -3,6 +3,7 @@
|
|||||||
### Public API Change
|
### Public API Change
|
||||||
* Support dynamically change `delete_obsolete_files_period_micros` option via SetDBOptions().
|
* Support dynamically change `delete_obsolete_files_period_micros` option via SetDBOptions().
|
||||||
* Added EventListener::OnExternalFileIngested which will be called when IngestExternalFile() add a file successfully.
|
* Added EventListener::OnExternalFileIngested which will be called when IngestExternalFile() add a file successfully.
|
||||||
|
* BackupEngine::Open and BackupEngineReadOnly::Open now always return error statuses matching those of the backup Env.
|
||||||
|
|
||||||
## 5.0.0 (11/17/2016)
|
## 5.0.0 (11/17/2016)
|
||||||
### Public API Change
|
### Public API Change
|
||||||
|
@ -556,8 +556,10 @@ Status BackupEngineImpl::Initialize() {
|
|||||||
std::vector<std::string> backup_meta_files;
|
std::vector<std::string> backup_meta_files;
|
||||||
{
|
{
|
||||||
auto s = backup_env_->GetChildren(GetBackupMetaDir(), &backup_meta_files);
|
auto s = backup_env_->GetChildren(GetBackupMetaDir(), &backup_meta_files);
|
||||||
if (!s.ok()) {
|
if (s.IsNotFound()) {
|
||||||
return Status::NotFound(GetBackupMetaDir() + " is missing");
|
return Status::NotFound(GetBackupMetaDir() + " is missing");
|
||||||
|
} else if (!s.ok()) {
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// create backups_ structure
|
// create backups_ structure
|
||||||
|
Loading…
Reference in New Issue
Block a user