From 08fffd3bc24b3058fd6e615c2f45cc3b6c796dfd Mon Sep 17 00:00:00 2001 From: Hui Liu Date: Mon, 24 Apr 2023 17:38:56 -0700 Subject: [PATCH] Empty check before calling openContainer on it (#10044) --- fdbserver/Status.actor.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/fdbserver/Status.actor.cpp b/fdbserver/Status.actor.cpp index 4c23674ea76..04599f4825a 100644 --- a/fdbserver/Status.actor.cpp +++ b/fdbserver/Status.actor.cpp @@ -2485,13 +2485,15 @@ ACTOR static Future blobGranulesStatusFetcher( // Mutation log backup state std::string mlogsUrl = wait(getMutationLogUrl()); statusObj["mutation_log_location"] = mlogsUrl; - state Reference bc = IBackupContainer::openContainer(mlogsUrl, {}, {}); - BackupDescription desc = wait(timeoutError(bc->describeBackup(), 2.0)); - if (desc.contiguousLogEnd.present()) { - statusObj["mutation_log_end_version"] = desc.contiguousLogEnd.get(); - } - if (desc.minLogBegin.present()) { - statusObj["mutation_log_begin_version"] = desc.minLogBegin.get(); + if (mlogsUrl != "") { + state Reference bc = IBackupContainer::openContainer(mlogsUrl, {}, {}); + BackupDescription desc = wait(timeoutError(bc->describeBackup(), 2.0)); + if (desc.contiguousLogEnd.present()) { + statusObj["mutation_log_end_version"] = desc.contiguousLogEnd.get(); + } + if (desc.minLogBegin.present()) { + statusObj["mutation_log_begin_version"] = desc.minLogBegin.get(); + } } } catch (Error& e) { if (e.code() == error_code_actor_cancelled)