diff --git a/reporting/BackendIndexer.cpp b/reporting/BackendIndexer.cpp index 624a4866..f450e649 100644 --- a/reporting/BackendIndexer.cpp +++ b/reporting/BackendIndexer.cpp @@ -52,15 +52,22 @@ BackendIndexer::doKeysRepair( // warning only shows up on the first page if (!warning) { - BOOST_LOG_TRIVIAL(debug) - << __func__ << " flag ledger already written. returning"; + BOOST_LOG_TRIVIAL(info) + << __func__ << " - " << std::to_string(*sequence) + << " flag ledger already written. returning"; return; } else { + BOOST_LOG_TRIVIAL(info) + << __func__ << " - " << std::to_string(*sequence) + << " flag ledger not written. recursing.."; uint32_t lower = (*sequence - 1) >> keyShift_ << keyShift_; doKeysRepair(backend, lower); - writeKeyFlagLedgerAsync(lower, backend); + BOOST_LOG_TRIVIAL(info) + << __func__ << " - " << std::to_string(*sequence) + << " finished recursing. submitting repair "; + writeKeyFlagLedgerAsync(*sequence, backend); return; } } diff --git a/reporting/Pg.cpp b/reporting/Pg.cpp index a3626592..e9ce37e6 100644 --- a/reporting/Pg.cpp +++ b/reporting/Pg.cpp @@ -965,8 +965,6 @@ CREATE OR REPLACE RULE account_transactions_update_protect AS ON UPDATE TO account_transactions DO INSTEAD NOTHING; CREATE OR REPLACE RULE objects_update_protect AS ON UPDATE TO objects DO INSTEAD NOTHING; -CREATE OR REPLACE RULE books_update_protect AS ON UPDATE TO - books DO INSTEAD NOTHING; -- Return the earliest ledger sequence intended for range operations diff --git a/reporting/PostgresBackend.cpp b/reporting/PostgresBackend.cpp index a9e89422..06441fac 100644 --- a/reporting/PostgresBackend.cpp +++ b/reporting/PostgresBackend.cpp @@ -697,6 +697,8 @@ PostgresBackend::writeKeys( { if (numRows > 0) conn.bulkInsert("keys", buffer.str()); + std::stringstream temp; + buffer.swap(temp); conn("COMMIT"); } return true; diff --git a/reporting/ReportingETL.cpp b/reporting/ReportingETL.cpp index 1727232c..a70e4335 100644 --- a/reporting/ReportingETL.cpp +++ b/reporting/ReportingETL.cpp @@ -69,7 +69,7 @@ ReportingETL::insertTransactions( auto metaSerializer = std::make_shared( txMeta.getAsObject().getSerializer()); - BOOST_LOG_TRIVIAL(debug) + BOOST_LOG_TRIVIAL(trace) << __func__ << " : " << "Inserting transaction = " << sttx.getTransactionID();