Skip to content

tx indexer: can lose data if crash after block committed before indexing finishes #3211

@ebuchman

Description

@ebuchman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C:consensusComponent: ConsensusC:rpcComponent: JSON RPC, gRPCC:syncComponent: Fast Sync, State SyncT:bugType Bug (Confirmed)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions