diff --git a/src/ripple/app/reporting/ETLSource.cpp b/src/ripple/app/reporting/ETLSource.cpp index 5c6d1d07b5..0fcdfe1e15 100644 --- a/src/ripple/app/reporting/ETLSource.cpp +++ b/src/ripple/app/reporting/ETLSource.cpp @@ -941,7 +941,7 @@ ETLLoadBalancer::execute(Func f, uint32_t ledgerSequence) << "Error executing function. " << " Tried all sources, but ledger was found in db." << " Sequence = " << ledgerSequence; - break; + return false; } JLOG(journal_.error()) << __func__ << " : " diff --git a/src/ripple/app/reporting/ReportingETL.cpp b/src/ripple/app/reporting/ReportingETL.cpp index 4db578b546..3008ae7825 100644 --- a/src/ripple/app/reporting/ReportingETL.cpp +++ b/src/ripple/app/reporting/ReportingETL.cpp @@ -524,14 +524,6 @@ ReportingETL::runETLPipeline(uint32_t startSequence) auto start = std::chrono::system_clock::now(); std::optional fetchResponse{ fetchLedgerDataAndDiff(currentSequence)}; - auto end = std::chrono::system_clock::now(); - - auto time = ((end - start).count()) / 1000000000.0; - auto tps = - fetchResponse->transactions_list().transactions_size() / time; - - JLOG(journal_.debug()) << "Extract phase time = " << time - << " . Extract phase tps = " << tps; // if the fetch is unsuccessful, stop. fetchLedger only returns // false if the server is shutting down, or if the ledger was // found in the database (which means another process already @@ -543,6 +535,14 @@ ReportingETL::runETLPipeline(uint32_t startSequence) { break; } + auto end = std::chrono::system_clock::now(); + + auto time = ((end - start).count()) / 1000000000.0; + auto tps = + fetchResponse->transactions_list().transactions_size() / time; + + JLOG(journal_.debug()) << "Extract phase time = " << time + << " . Extract phase tps = " << tps; transformQueue.push(std::move(fetchResponse)); ++currentSequence;