Remove assert on error_code_key_not_found in previous commit

Correctnss shows the assert does not hold in all scenarios
This commit is contained in:
Meng Xu 2020-06-08 19:02:53 -07:00
parent 5022566b35
commit e7fdd614fe
3 changed files with 3 additions and 6 deletions

View File

@ -883,8 +883,7 @@ public:
}
TraceEvent t(SevWarn, "FileBackupError");
t.error(e).detail("BackupUID", uid).detail("Description", details).detail("TaskInstance", (uint64_t)taskInstance);
// These should not happen
ASSERT(e.code() != error_code_key_not_found);
// key_not_found could happen
if(e.code() == error_code_key_not_found)
t.backtrace();

View File

@ -235,8 +235,7 @@ public:
}
TraceEvent t(SevWarn, "FileRestoreError");
t.error(e).detail("RestoreUID", uid).detail("Description", details).detail("TaskInstance", (uint64_t)taskInstance);
// These should not happen
ASSERT(e.code() != error_code_key_not_found);
// key_not_found could happen
if(e.code() == error_code_key_not_found)
t.backtrace();

View File

@ -122,8 +122,7 @@ Future<Void> RestoreConfigFR::logError(Database cx, Error e, std::string const&
}
TraceEvent t(SevWarn, "FileRestoreError");
t.error(e).detail("RestoreUID", uid).detail("Description", details).detail("TaskInstance", (uint64_t)taskInstance);
// These should not happen
ASSERT(e.code() != error_code_key_not_found);
// key_not_found could happen
if (e.code() == error_code_key_not_found) t.backtrace();
return updateErrorInfo(cx, e, details);