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

feat(interfaces): database write error details #4190

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Aug 14, 2023

When we encounter a database write error, all we get is

2023-08-13T10:10:38.571008Z ERROR consensus::engine: Encountered fatal error err=CanonicalCommit { inner: "Database write error code: -30418" }

which is not enough to debug what's happening as multiple writes can be made inside one function.

This solution is one way to help us debug write errors, other way is to provide more context on the caller side which is more cumbersome imo.

@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Merging #4190 (0a06c51) into main (dfdfea8) will decrease coverage by 0.02%.
Report is 2 commits behind head on main.
The diff coverage is 89.18%.

Impacted file tree graph

Files Changed Coverage Δ
crates/storage/db/src/lib.rs 53.94% <ø> (ø)
crates/storage/db/src/implementation/mdbx/tx.rs 89.32% <50.00%> (-3.32%) ⬇️
...rates/storage/db/src/implementation/mdbx/cursor.rs 80.70% <88.57%> (+1.71%) ⬆️
crates/interfaces/src/db.rs 75.00% <100.00%> (+8.33%) ⬆️
crates/storage/db/src/implementation/mdbx/mod.rs 97.43% <100.00%> (+0.08%) ⬆️

... and 14 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.89% <0.00%> (-0.01%) ⬇️
unit-tests 64.19% <89.18%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 26.60% <ø> (ø)
blockchain tree 82.56% <ø> (-0.27%) ⬇️
pipeline 90.07% <ø> (ø)
storage (db) 74.84% <89.04%> (+0.08%) ⬆️
trie 94.67% <ø> (ø)
txpool 51.43% <ø> (-0.60%) ⬇️
networking 77.75% <ø> (+0.04%) ⬆️
rpc 58.68% <ø> (+0.02%) ⬆️
consensus 63.73% <ø> (ø)
revm 32.19% <ø> (ø)
payload builder 6.57% <ø> (ø)
primitives 87.80% <100.00%> (-0.05%) ⬇️

@shekhirin shekhirin marked this pull request as ready for review August 14, 2023 12:45
@shekhirin shekhirin added A-db Related to the database A-observability Related to tracing, metrics, logs and other observability tools labels Aug 14, 2023
@shekhirin shekhirin requested a review from mattsse August 14, 2023 12:46
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reasonable

@shekhirin shekhirin added this pull request to the merge queue Aug 14, 2023
Merged via the queue into main with commit b2be35c Aug 14, 2023
24 checks passed
@shekhirin shekhirin deleted the alexey/database-error-write-details branch August 14, 2023 13:17
alessandromazza98 pushed a commit to alessandromazza98/reth that referenced this pull request Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-db Related to the database A-observability Related to tracing, metrics, logs and other observability tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants