From 39ee2d90fa136d977f07f623053f6cabf9cf8766 Mon Sep 17 00:00:00 2001 From: marta-lokhova Date: Mon, 21 Oct 2024 10:29:06 -0700 Subject: [PATCH] Skip publush migration on nodes where publish is disabled --- src/history/HistoryManagerImpl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/history/HistoryManagerImpl.cpp b/src/history/HistoryManagerImpl.cpp index 0564ff9ab8..afebb6d871 100644 --- a/src/history/HistoryManagerImpl.cpp +++ b/src/history/HistoryManagerImpl.cpp @@ -122,6 +122,12 @@ writeCheckpointFile(Application& app, HistoryArchiveState const& has, void HistoryManagerImpl::dropSQLBasedPublish() { + if (!mApp.getHistoryArchiveManager().publishEnabled()) + { + // Publish is disabled, nothing to do + return; + } + // soci::transaction is created externally during schema upgrade, so this // function is atomic releaseAssert(threadIsMain()); @@ -660,8 +666,6 @@ HistoryManagerImpl::appendLedgerHeader(LedgerHeader const& header) { mCheckpointBuilder.appendLedgerHeader(header); #ifdef BUILD_TESTS - CLOG_INFO(History, "Appending ledger header for ledger {} {}", - header.ledgerSeq, mThrowOnAppend); if (header.ledgerSeq == mThrowOnAppend) { throw std::runtime_error("Throwing for testing");