flow-go
flow-go copied to clipboard
[Badger] Add universal database operations
This PR implemented the low level database operations that can be shared by both badger and pebble implementation.
Since badger operations will be refactored to use batch updates instead of transactions, this makes the badger db operations and pebble db operations very similar and I managed to unify them.
A separate PR that refactors the approvals will demonstrate how the unified database operations can be used there. (see https://github.com/onflow/flow-go/pull/6466)
This allows us to remove both the badger-specific and pebble-specific database modules, and only keep one universal version, easier to maintain.
Codecov Report
Attention: Patch coverage is 30.39216% with 355 lines in your changes missing coverage. Please review.
Project coverage is 40.96%. Comparing base (
0310dfd) to head (24d65bc).
Additional details and impacted files
@@ Coverage Diff @@
## master #6465 +/- ##
==========================================
- Coverage 40.98% 40.96% -0.02%
==========================================
Files 2079 2093 +14
Lines 183922 184432 +510
==========================================
+ Hits 75382 75555 +173
- Misses 102240 102563 +323
- Partials 6300 6314 +14
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 40.96% <30.39%> (-0.02%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.