mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-20 11:45:53 +00:00
Postgres fixes (#84)
* Postgres fixes * Create partial index for ledger_diffs, to avoid indexing the first ledger's objects * Don't write duplicate keys to successor table * default to 4 markers when syncing cache * remove isFirst from writeLedger interface
This commit is contained in:
@@ -11,7 +11,6 @@ private:
|
||||
mutable std::stringstream objectsBuffer_;
|
||||
mutable size_t numRowsInSuccessorBuffer_ = 0;
|
||||
mutable std::stringstream successorBuffer_;
|
||||
mutable std::stringstream keysBuffer_;
|
||||
mutable std::stringstream transactionsBuffer_;
|
||||
mutable std::stringstream accountTxBuffer_;
|
||||
std::shared_ptr<PgPool> pgPool_;
|
||||
@@ -19,6 +18,8 @@ private:
|
||||
mutable bool abortWrite_ = false;
|
||||
mutable boost::asio::thread_pool pool_{16};
|
||||
uint32_t writeInterval_ = 1000000;
|
||||
uint32_t inProcessLedger = 0;
|
||||
std::unordered_set<std::string> successors_;
|
||||
|
||||
public:
|
||||
PostgresBackend(boost::json::object const& config);
|
||||
@@ -75,8 +76,7 @@ public:
|
||||
void
|
||||
writeLedger(
|
||||
ripple::LedgerInfo const& ledgerInfo,
|
||||
std::string&& ledgerHeader,
|
||||
bool isFirst) override;
|
||||
std::string&& ledgerHeader) override;
|
||||
|
||||
void
|
||||
doWriteLedgerObject(std::string&& key, uint32_t seq, std::string&& blob)
|
||||
|
||||
Reference in New Issue
Block a user