foreign key constraint fk_hive_app_context violated at startup
Timing is on.
NOTICE: Last block processed by application: 80133988
NOTICE: Entering application main loop...
NOTICE: HAF instance is ready. Exiting wait loop...
NOTICE: Attempting to process block range: <80133989,80134676>
NOTICE: Entering massive processing of block range: <80133989, 80134676>...
NOTICE: Detaching HAF application context...
NOTICE: Attempting to process a block range: <80133989, 80134676>
NOTICE: btracker_app_a processed successfully. 1.145 seconds
NOTICE: Updated last processed block.
NOTICE: btracker_app_b processed successfully. 1.664 seconds
NOTICE: hafbe_app_a processed successfully. 0.022 seconds
NOTICE: hafbe_app_b processed successfully. 0.025 seconds
NOTICE: hafbe_app_c processed successfully. 0.802 seconds
NOTICE: state_provider processed successfully. 0.005 seconds
NOTICE: Processed 10000 blocks in 122487.185 seconds
NOTICE: Block processing running for 0.06 minutes
NOTICE: Attaching HAF application context at block: 80134676.
NOTICE: Leaving massive processing of block range: <80133989, 80134676>...
NOTICE: HAF instance is ready. Exiting wait loop...
ERROR: insert or update on table "contexts" violates foreign key constraint "fk_hive_app_context"
DETAIL: Key is not present in table "events_queue".
CONTEXT: SQL statement "UPDATE hive.contexts
SET events_id = __result.id
WHERE name =ANY( _contexts )"
PL/pgSQL function hive.find_next_event(hive.contexts_group) line 54 at SQL statement
SQL statement "SELECT * FROM hive.find_next_event( _contexts )"
PL/pgSQL function hive.squash_and_get_state(hive.contexts_group) line 24 at SQL statement
SQL statement "SELECT * FROM hive.squash_and_get_state( _context_names )"
PL/pgSQL function hive.app_next_block_forking_app(hive.contexts_group) line 7 at SQL statement
PL/pgSQL function hive.app_next_block(hive.contexts_group) line 12 at RETURN
PL/pgSQL function hafbe_app.main(character varying,character varying,integer) line 28 at assignment
Time: 3996.509 ms (00:03.997)
This happened on shed14, running this version of block explorer: 112f3def and this version of haf: haf@29ad92e5
HAF, hivemind, and hafbe were all running and in sync. I shut down the entire stack for a few minutes, then brought the entire stack back up and got the error above.
Edited by Eric Frias