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

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

Closed
ebuchman opened this issue Jan 25, 2019 · 2 comments
Labels
C:consensus Component: Consensus C:rpc Component: JSON RPC, gRPC C:sync Component: Fast Sync, State Sync T:bug Type Bug (Confirmed)

Comments

@ebuchman
Copy link
Contributor

ebuchman commented Jan 25, 2019

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.

@ebuchman ebuchman added C:sync Component: Fast Sync, State Sync C:rpc Component: JSON RPC, gRPC C:consensus Component: Consensus T:bug Type Bug (Confirmed) labels Jan 25, 2019
@Stumble
Copy link
Contributor

Stumble commented Apr 4, 2019

One question, is there setting or any ongoing proposal that can make tx_indexer runs synchronously?

@tac0turtle
Copy link
Contributor

we recently implemented a re-indexing feature. Please reopen if you see this issue as still relevant.

Tendermint Core Project Board automation moved this from Untriaged 🥚 to Done 🎉 Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:consensus Component: Consensus C:rpc Component: JSON RPC, gRPC C:sync Component: Fast Sync, State Sync T:bug Type Bug (Confirmed)
Projects
No open projects
Development

No branches or pull requests

4 participants