diff --git a/reporting/ReportingBackend.cpp b/reporting/ReportingBackend.cpp index 5b855d4f..9a9986cb 100644 --- a/reporting/ReportingBackend.cpp +++ b/reporting/ReportingBackend.cpp @@ -838,9 +838,9 @@ CassandraFlatMapBackend::open() query = {}; query << "CREATE TABLE IF NOT EXISTS " << tableName << "account_tx" << " ( account blob, seq_idx tuple, " - " hash blob" + " hash blob, " "PRIMARY KEY " - "(account, seq_idx) WITH " + "(account, seq_idx)) WITH " "CLUSTERING ORDER BY (seq_idx desc)"; statement = makeStatement(query.str().c_str(), 0); fut = cass_session_execute(session_.get(), statement); @@ -1430,7 +1430,7 @@ CassandraFlatMapBackend::open() cass_future_free(prepare_future); std::stringstream ss; - ss << "nodestore: error preparing gettoken : " << rc << ", " + ss << "nodestore: error preparing updateLedgerRange : " << rc << ", " << cass_error_desc(rc); BOOST_LOG_TRIVIAL(error) << ss.str(); continue; @@ -1438,7 +1438,7 @@ CassandraFlatMapBackend::open() updateLedgerRange_ = cass_future_get_prepared(prepare_future); query = {}; - query << " select header from ledgers where sequence = ?"; + query << " select header from " << tableName << "ledgers where sequence = ?"; prepare_future = cass_session_prepare(session_.get(), query.str().c_str()); @@ -1452,7 +1452,7 @@ CassandraFlatMapBackend::open() cass_future_free(prepare_future); std::stringstream ss; - ss << "nodestore: error preparing gettoken : " << rc << ", " + ss << "nodestore: error preparing selectLedgerBySeq : " << rc << ", " << cass_error_desc(rc); BOOST_LOG_TRIVIAL(error) << ss.str(); continue; @@ -1460,7 +1460,7 @@ CassandraFlatMapBackend::open() selectLedgerBySeq_ = cass_future_get_prepared(prepare_future); query = {}; - query << " select sequence from ledgers_range where is_latest = true"; + query << " select sequence from " << tableName << "ledger_range where is_latest = true"; prepare_future = cass_session_prepare(session_.get(), query.str().c_str()); @@ -1474,7 +1474,7 @@ CassandraFlatMapBackend::open() cass_future_free(prepare_future); std::stringstream ss; - ss << "nodestore: error preparing gettoken : " << rc << ", " + ss << "nodestore: error preparing selectLatestLedger : " << rc << ", " << cass_error_desc(rc); BOOST_LOG_TRIVIAL(error) << ss.str(); continue; diff --git a/reporting/ReportingETL.cpp b/reporting/ReportingETL.cpp index 02806fe0..fc51154b 100644 --- a/reporting/ReportingETL.cpp +++ b/reporting/ReportingETL.cpp @@ -428,13 +428,13 @@ ReportingETL::runETLPipeline(uint32_t startSequence) if (isStopping()) continue; + auto numTxns = fetchResponse->transactions_list().transactions_size(); + auto numObjects = fetchResponse->ledger_objects().objects_size(); auto start = std::chrono::system_clock::now(); auto [lgrInfo, success] = buildNextLedger(*fetchResponse); auto end = std::chrono::system_clock::now(); auto duration = ((end - start).count()) / 1000000000.0; - auto numTxns = fetchResponse->hashes_list().hashes_size(); - auto numObjects = fetchResponse->ledger_objects().objects_size(); BOOST_LOG_TRIVIAL(info) << "Load phase of etl : " << "Successfully published ledger! Ledger info: "