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:
CJ Cobb
2022-01-07 14:48:48 -05:00
committed by GitHub
parent 628ede5bdb
commit 6e6f47421d
10 changed files with 84 additions and 65 deletions

View File

@@ -19,7 +19,6 @@ class DatabaseTimeout : public std::exception
class BackendInterface
{
protected:
bool isFirst_ = true;
std::optional<LedgerRange> range;
SimpleCache cache_;
@@ -153,8 +152,7 @@ public:
virtual void
writeLedger(
ripple::LedgerInfo const& ledgerInfo,
std::string&& ledgerHeader,
bool isFirst = false) = 0;
std::string&& ledgerHeader) = 0;
void
writeLedgerObject(std::string&& key, uint32_t seq, std::string&& blob);