From b260f771e36254e86d10c34ce992f7d8a9c87e41 Mon Sep 17 00:00:00 2001 From: Bartek Nowotarski Date: Tue, 6 Oct 2020 17:23:26 +0200 Subject: [PATCH 1/2] services/horizon: Add claimable_balances table to state tables to truncate --- services/horizon/internal/db2/history/ingestion.go | 1 + services/horizon/internal/expingest/main.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/horizon/internal/db2/history/ingestion.go b/services/horizon/internal/db2/history/ingestion.go index 3eda506d90..a2c6094a7a 100644 --- a/services/horizon/internal/db2/history/ingestion.go +++ b/services/horizon/internal/db2/history/ingestion.go @@ -10,6 +10,7 @@ func (q *Q) TruncateExpingestStateTables() error { "accounts", "accounts_data", "accounts_signers", + "claimable_balances", "exp_asset_stats", "offers", "trust_lines", diff --git a/services/horizon/internal/expingest/main.go b/services/horizon/internal/expingest/main.go index ee5d54be6d..80495f484a 100644 --- a/services/horizon/internal/expingest/main.go +++ b/services/horizon/internal/expingest/main.go @@ -46,7 +46,9 @@ const ( // - 10: Fixes a bug in meta processing (fees are now processed before // everything else). // - 11: Protocol 14: CAP-23 and CAP-33. - CurrentVersion = 11 + // - 12: Trigger state rebuild due to `absTime` -> `abs_time` rename + // in ClaimableBalances predicates. + CurrentVersion = 12 // MaxDBConnections is the size of the postgres connection pool dedicated to Horizon ingestion: // * Ledger ingestion, From 910f0d34e3520ff28bb75cc150c54c8d57072519 Mon Sep 17 00:00:00 2001 From: Bartek Nowotarski Date: Tue, 6 Oct 2020 17:29:55 +0200 Subject: [PATCH 2/2] fix test --- services/horizon/internal/expingest/verify.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/horizon/internal/expingest/verify.go b/services/horizon/internal/expingest/verify.go index 2ee8173a41..dd1c3804e4 100644 --- a/services/horizon/internal/expingest/verify.go +++ b/services/horizon/internal/expingest/verify.go @@ -27,7 +27,7 @@ const assetStatsBatchSize = 500 // check them. // There is a test that checks it, to fix it: update the actual `verifyState` // method instead of just updating this value! -const stateVerifierExpectedIngestionVersion = 11 +const stateVerifierExpectedIngestionVersion = 12 // verifyState is called as a go routine from pipeline post hook every 64 // ledgers. It checks if the state is correct. If another go routine is already