Skip to content

Commit

Permalink
Revert downgrading of log error->warn->error
Browse files Browse the repository at this point in the history
use const error message POSSIBLY_CORRUPTED_HISTORY, add more guidance
  • Loading branch information
ThomasBrady committed Oct 23, 2024
1 parent f29b9f1 commit 17d4193
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions src/historywork/CheckSingleLedgerHeaderWork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "history/HistoryArchive.h"
#include "history/HistoryManager.h"
#include "historywork/GetAndUnzipRemoteFileWork.h"
#include "main/ErrorMessages.h"
#include "util/GlobalChecks.h"
#include "util/Logging.h"
#include "util/TmpDir.h"
Expand Down Expand Up @@ -84,9 +85,16 @@ CheckSingleLedgerHeaderWork::doWork()
}
else if (mGetLedgerFileWork->getState() != State::WORK_SUCCESS)
{
CLOG_WARNING(History,
"Failed to download ledger checkpoint {} from archive {}",
mFt->baseName_gz(), mArchive->getName());
CLOG_ERROR(
History,
"Failed to download ledger checkpoint {} from archive {}: {}",
mFt->baseName_gz(), mArchive->getName(),
POSSIBLY_CORRUPTED_HISTORY);
CLOG_ERROR(
History,
"If this occurs often, consider notifying the archive "
"owner. As long as your configuration has any valid history "
"archives, this error does NOT mean your node is unhealthy.");
return mGetLedgerFileWork->getState();
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/ErrorMessages.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ constexpr auto const REPORT_INTERNAL_BUG =
"Please report this bug along with this log file if this was not expected";
constexpr auto const POSSIBLY_CORRUPTED_HISTORY =
"One or more of history archives may be corrupted. Update HISTORY "
"configuration entry to only contain valid ones";
"configuration entry to only contain valid ones.";
constexpr auto const POSSIBLY_CORRUPTED_LOCAL_FS =
"There may be a problem with the local filesystem. Ensure that there is "
"enough space to perform that operation and that disc is behaving "
Expand Down

0 comments on commit 17d4193

Please sign in to comment.