tx indexer: can lose data if crash after block committed before indexing finishes #3211
Labels
C:consensus
Component: Consensus
C:rpc
Component: JSON RPC, gRPC
C:sync
Component: Fast Sync, State Sync
T:bug
Type Bug (Confirmed)
Projects
Milestone
Indexing of the txs in a block happens asynchronously so as to not block the next heights consensus. But if the block is fully committed and the process crashes before the indexing is complete, on restart, the old block will not be replayed, and so some txs will not have been properly indexed.
During the replay sequence on a restart, we must check to ensure that all txs from the previous block were indexed, and if not, re-index them.
Related to #3186, but that's talking about a block that didn't even finish committing. In that case, the block does get replayed, we just didn't start the eventBus ahead of time. Here, we need to check explicitly if txs didnt finish indexing.
The text was updated successfully, but these errors were encountered: