Error Handling for Long-Lived Database Transactions #6699
Labels
A-db
Related to the database
A-observability
Related to tracing, metrics, logs and other observability tools
C-bug
An unexpected or incorrect behavior
Describe the bug
when using the
DatabaseProvider
, which is a wrapper around a database transaction, the underlying transaction has a time-to-live of 5 minutes before invalidatingThis can cause bad behaviour if for example the provider is being held onto (as a struct field), and a database transaction is attempted, then the following error is encountered
Although not necessarily a bug, this issue is a bug/feature request for improved error handling around this case, where instead the user should see some error relating to the underlying
tx
timeout. Rather than a cryptic memory error related to the MDBX databaseSteps to reproduce
case is in custom RPC extension
RethNodeCommandConfig
trait, and specificallyextend_rpc_modules
methodgives a DatabaseProviderRO
CustomEthNamespaceServer
Node logs
Platform(s)
Linux (x86)
What version/commit are you on?
0.1.0-alpha.19
What database version are you on?
1
What type of node are you running?
Full via --full flag
What prune config do you use, if any?
No response
If you've built Reth from source, provide the full command you used
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: