You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, all of the index updates happen during the block connection path and in the same database transaction as all other chain-related updates. This was originally done to ensure atomicity. However, since the indexes are merely indexing immutable blockchain data, failure to write the most recent data is completely recoverable via the reconcile path at startup, and thus, all indexing should ideally be done via a separate goroutine.
Also, as it is currently written, by indexing in the same thread as the block validation and connection code, it slows down block validation as compared to not having indexing enabled. Block validation and connection needs to be as fast as possible, so this is not desirable.
This will require taking the time to really understand the concurrency model used in the blockchain package to ensure that unclean shutdown recover properly and do no leave the database in an inconsistent state.
The text was updated successfully, but these errors were encountered:
Currently, all of the index updates happen during the block connection path and in the same database transaction as all other chain-related updates. This was originally done to ensure atomicity. However, since the indexes are merely indexing immutable blockchain data, failure to write the most recent data is completely recoverable via the reconcile path at startup, and thus, all indexing should ideally be done via a separate goroutine.
Also, as it is currently written, by indexing in the same thread as the block validation and connection code, it slows down block validation as compared to not having indexing enabled. Block validation and connection needs to be as fast as possible, so this is not desirable.
This will require taking the time to really understand the concurrency model used in the blockchain package to ensure that unclean shutdown recover properly and do no leave the database in an inconsistent state.
The text was updated successfully, but these errors were encountered: