Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horizon db reingest command has duplicate error when run multiple times with same ledger range #4110

Closed
sreuland opened this issue Nov 30, 2021 · 4 comments · Fixed by #4114
Assignees
Labels

Comments

@sreuland
Copy link
Contributor

What version are you using?

v2.11.0

What did you do?

I ran this ingest command on an empty db
horizon db reingest range 962300 963300 --db-url <any_url_here> --history-archive-urls https://history.stellar.org/prd/core-testnet/core_testnet_001,https://history.stellar.org/prd/core-testnet/core_testnet_002 --network-passphrase "Test SDF Network ; September 2015"

then I ran the same command a second time against the same db, noticed reingest reported errors on the second time, stopped re-ingesting.

What did you expect to see?

the reingestion completes to final ledger without errors on console

What did you see instead?

ERRO[2021-11-30T12:22:56.255-08:00] Error in ingestion state machine
current_state="reingestHistoryRange(fromLedger=962300, toLedger=963300, force=false)" 
error="error processing ledger sequence=962976: Error commiting changes from processor: error in 
*processors.LiquidityPoolsTransactionProcessor.Commit: could not flush transaction liquidity 
pools to db: error adding values while inserting to history_transaction_liquidity_pools: 
exec failed: pq: duplicate key value violates unique 
constraint \"index_history_transaction_liquidity_pools_on_ids\"" next_state=stop pid=20551 service=ingest

INFO[2021-11-30T12:22:56.255-08:00] Shut down pid=20551 service=ingest
error processing ledger sequence=962976: Error commiting changes from processor: error in
*processors.LiquidityPoolsTransactionProcessor.Commit: could not flush 
transaction liquidity pools to db: error adding values while inserting to 
history_transaction_liquidity_pools: exec failed: pq: duplicate key value violates unique constraint
"index_history_transaction_liquidity_pools_on_ids"

@sreuland sreuland added the bug label Nov 30, 2021
@sreuland
Copy link
Contributor Author

there is possible related history of same pattern just on different table, and the approach taken:

#3661

@bartekn
Copy link
Contributor

bartekn commented Dec 1, 2021

Looks like quite easy to fix and also critical (reingestion doesn't work). @tamirms do you think we can include this in 2.12.0 (we can assign somebody to fix)?

@tamirms
Copy link
Contributor

tamirms commented Dec 1, 2021

yeah, we can include this in the 2.12.0 release

@bartekn
Copy link
Contributor

bartekn commented Dec 23, 2021

Done but not closed. Doing it now.

@bartekn bartekn closed this as completed Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants