added support for explicit compaction#111
Merged
jmalicevic merged 25 commits intomainfrom Feb 7, 2024
Merged
Conversation
3 tasks
7 tasks
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #111 +/- ##
==========================================
+ Coverage 76.80% 77.19% +0.38%
==========================================
Files 23 23
Lines 2048 2109 +61
==========================================
+ Hits 1573 1628 +55
- Misses 403 407 +4
- Partials 72 74 +2
|
adizere
approved these changes
Jan 30, 2024
Contributor
adizere
left a comment
There was a problem hiding this comment.
left a couple of nit & suggestions
Co-authored-by: Adi Seredinschi <a@seredinschi.net>
sergio-mena
reviewed
Jan 31, 2024
…metbft-db into jasmina/add-compaction-to-db
melekes
reviewed
Feb 7, 2024
melekes
approved these changes
Feb 7, 2024
github-merge-queue bot
pushed a commit
to cometbft/cometbft
that referenced
this pull request
Feb 16, 2024
Blocked on cometbft/cometbft-db#111 and benchmarking Addresses #49 Upon pruning we explicitly call the compaction function of the DB backend. This has shown to immediately shrink the storage footprint. We need to evaluate the duration of this compaction depending on the storage size to be able to reason about the impact on Comet's regular operations. ToDo: -Extend the `storage` config section with following parameters: - [ ] `in-process-compaction = false #Enable or disable in-process compaction. False by default` - [ ] `in-process-compaction-interval = 10 #Interval in number of blocks to trigger explicit compaction; 10 by default` <!-- Please add a reference to the issue that this PR addresses and indicate which files are most critical to review. If it fully addresses a particular issue, please include "Closes #XXX" (where "XXX" is the issue number). If this PR is non-trivial/large/complex, please ensure that you have either created an issue that the team's had a chance to respond to, or had some discussion with the team prior to submitting substantial pull requests. The team can be reached via GitHub Discussions or the Cosmos Network Discord server in the #cometbft channel. GitHub Discussions is preferred over Discord as it allows us to keep track of conversations topically. https://github.com/cometbft/cometbft/discussions If the work in this PR is not aligned with the team's current priorities, please be advised that it may take some time before it is merged - especially if it has not yet been discussed with the team. See the project board for the team's current priorities: https://github.com/orgs/cometbft/projects/1 --> --- #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: Andy Nogueira <me@andynogueira.dev> Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
mergify bot
pushed a commit
to cometbft/cometbft
that referenced
this pull request
Feb 16, 2024
Blocked on cometbft/cometbft-db#111 and benchmarking Addresses #49 Upon pruning we explicitly call the compaction function of the DB backend. This has shown to immediately shrink the storage footprint. We need to evaluate the duration of this compaction depending on the storage size to be able to reason about the impact on Comet's regular operations. ToDo: -Extend the `storage` config section with following parameters: - [ ] `in-process-compaction = false #Enable or disable in-process compaction. False by default` - [ ] `in-process-compaction-interval = 10 #Interval in number of blocks to trigger explicit compaction; 10 by default` <!-- Please add a reference to the issue that this PR addresses and indicate which files are most critical to review. If it fully addresses a particular issue, please include "Closes #XXX" (where "XXX" is the issue number). If this PR is non-trivial/large/complex, please ensure that you have either created an issue that the team's had a chance to respond to, or had some discussion with the team prior to submitting substantial pull requests. The team can be reached via GitHub Discussions or the Cosmos Network Discord server in the #cometbft channel. GitHub Discussions is preferred over Discord as it allows us to keep track of conversations topically. https://github.com/cometbft/cometbft/discussions If the work in this PR is not aligned with the team's current priorities, please be advised that it may take some time before it is merged - especially if it has not yet been discussed with the team. See the project board for the team's current priorities: https://github.com/orgs/cometbft/projects/1 --> --- #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: Andy Nogueira <me@andynogueira.dev> Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com> (cherry picked from commit cfe8b88) # Conflicts: # internal/state/store.go # internal/store/store.go # node/node.go
3 tasks
greg-szabo
pushed a commit
to cometbft/cometbft
that referenced
this pull request
Feb 22, 2024
Blocked on cometbft/cometbft-db#111 and benchmarking Addresses #49 Upon pruning we explicitly call the compaction function of the DB backend. This has shown to immediately shrink the storage footprint. We need to evaluate the duration of this compaction depending on the storage size to be able to reason about the impact on Comet's regular operations. ToDo: -Extend the `storage` config section with following parameters: - [ ] `in-process-compaction = false #Enable or disable in-process compaction. False by default` - [ ] `in-process-compaction-interval = 10 #Interval in number of blocks to trigger explicit compaction; 10 by default` <!-- Please add a reference to the issue that this PR addresses and indicate which files are most critical to review. If it fully addresses a particular issue, please include "Closes #XXX" (where "XXX" is the issue number). If this PR is non-trivial/large/complex, please ensure that you have either created an issue that the team's had a chance to respond to, or had some discussion with the team prior to submitting substantial pull requests. The team can be reached via GitHub Discussions or the Cosmos Network Discord server in the #cometbft channel. GitHub Discussions is preferred over Discord as it allows us to keep track of conversations topically. https://github.com/cometbft/cometbft/discussions If the work in this PR is not aligned with the team's current priorities, please be advised that it may take some time before it is merged - especially if it has not yet been discussed with the team. See the project board for the team's current priorities: https://github.com/orgs/cometbft/projects/1 --> --- #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: Andy Nogueira <me@andynogueira.dev> Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an API for explicit compaction for different DB backends.
badger and bolt do not support this, hence the function returns nil.
Addresses partially cometbft/cometbft#49