Granola-Team / mina-indexer

The Mina Indexer is a re-imagined version of the software collectively called the "Mina archive node."
Apache License 2.0
18 stars 10 forks source link

Problem: assertion error restarting the database #1246

Closed robinbb closed 1 month ago

robinbb commented 2 months ago
2024-07-04T08:26:41.116401-07:00 - DEBUG Building an indexer configuration
2024-07-04T08:26:41.118204-07:00 - INFO Using default mainnet genesis ledger
2024-07-04T08:26:41.119680-07:00 - DEBUG Creating a new IndexerStore in /mnt/mina-indexer-test/db/0.7.1-340000
2024-07-04T08:29:52.647114-07:00 - DEBUG INDEXER_VERSION file exists. Checking for compatability
2024-07-04T08:29:52.647206-07:00 - INFO Starting the web server listening on localhost:17057
2024-07-04T08:29:52.647262-07:00 - INFO Starting mina-indexer server
2024-07-04T08:29:52.657122-07:00 - INFO Syncing indexer state from db at /mnt/mina-indexer-test/db/0.7.1-340000
2024-07-04T08:29:52.657191-07:00 - INFO Parsing staking ledgers in /mnt/mina-indexer-test/staking-ledgers
2024-07-04T08:29:52.657472-07:00 - DEBUG Looking for witness tree root block
thread 'tokio-runtime-worker' panicked at src/state/mod.rs:1007:17:
assertion `left == right` failed
  left: Some(309156)
 right: Some(309146)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2024-07-04T08:29:53.213807-07:00 - INFO Shutting down primary database instance
Error: at least one subsystem returned an error

The above assertion error really does represent an error in logic, I think. This happens when the Indexer is ingesting, and then encounters an error from which it does not recover (out of disk space, out of memory) or is killed with a signal. Upon restarting (after the error is corrected), this assertion error arises.

This is urgent and important because it means that one's database is useless, and one can never restart the Indexer.

robinbb commented 2 months ago

Related to #1273 .