-
Notifications
You must be signed in to change notification settings - Fork 608
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
Move forceprune logic into functions, make db open/closes all in a single scope #1321
Conversation
opts := opt.Options{ | ||
DisableSeeksCompaction: true, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose to duplicate this in each function, since its pretty unclear to me that longer term, these won't be different for every function
Codecov Report
@@ Coverage Diff @@
## main #1321 +/- ##
==========================================
- Coverage 19.81% 19.42% -0.40%
==========================================
Files 210 199 -11
Lines 27884 27455 -429
==========================================
- Hits 5525 5332 -193
+ Misses 21333 21133 -200
+ Partials 1026 990 -36 Continue to review full report at Codecov.
|
What is the purpose of the change
Follow up PR to #1262, it shuffles the logic into functions, so each db opening and closing all happens in a single scope. (And therefore defer closes work as expected)
Beyond DB closing behavior, the logic should be identical
cc @moniya12
Brief change log
No logic change, just code structure updates to the forceprune command. Also updates variables names from snake case to camel case (matching the rest of the repo)
Testing and Verifying
This change is a trivial rework / code cleanup without any test coverage.
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? no (not needed)