Skip to content

Commit

Permalink
[pruner] enable periodic compaction of individual SST files by default (
Browse files Browse the repository at this point in the history
#20101)

## Description 
enables periodic compaction of individual SST files by default

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
phoenix-o authored Oct 31, 2024
1 parent f267071 commit 65b02e2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/sui-config/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,10 @@ pub struct AuthorityStorePruningConfig {
/// enables periodic background compaction for old SST files whose last modified time is
/// older than `periodic_compaction_threshold_days` days.
/// That ensures that all sst files eventually go through the compaction process
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(
default = "default_periodic_compaction_threshold_days",
skip_serializing_if = "Option::is_none"
)]
pub periodic_compaction_threshold_days: Option<usize>,
/// number of epochs to keep the latest version of transactions and effects for
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down Expand Up @@ -715,6 +718,10 @@ fn default_smoothing() -> bool {
cfg!(not(test))
}

fn default_periodic_compaction_threshold_days() -> Option<usize> {
Some(1)
}

impl Default for AuthorityStorePruningConfig {
fn default() -> Self {
Self {
Expand Down

0 comments on commit 65b02e2

Please sign in to comment.