Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion kvdb-rocksdb/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ The format is based on [Keep a Changelog].

## [Unreleased]

## [0.20.2] - 2025-11-17
## [0.20.2] - 2025-11-28
- Do not force compact rocksdb on startup of a node [#958](https://github.com/paritytech/parity-common/pull/958)
- Make snappy and jemalloc configurable features [#950](https://github.com/paritytech/parity-common/pull/950)

## [0.20.1] - 2025-11-07
Expand Down
11 changes: 2 additions & 9 deletions kvdb-rocksdb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ impl Database {
Self::open_primary(&opts, path.as_ref(), config, column_names.as_slice(), &block_opts)?
};

let db = Database {
Ok(Database {
inner: DBAndColumns { db, column_names },
config: config.clone(),
opts,
Expand All @@ -363,14 +363,7 @@ impl Database {
block_opts,
stats: stats::RunningDbStats::new(),
last_compaction: Mutex::new(Instant::now()),
};

// After opening the DB, we want to compact it.
//
// This just in case the node crashed before to ensure the db stays fast.
db.force_compaction()?;
Copy link

Choose a reason for hiding this comment

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

dq: This is not limited to archive nodes, but we have observed this while running archives?

Copy link
Member Author

Choose a reason for hiding this comment

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

I had tested this before mainly with warp synced nodes. Aka not a node that has a 600GB disk 🙈

That it takes ages was detected while trying to switch to the stable25rc1 release on our westend nodes.

Copy link

Choose a reason for hiding this comment

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

Makes sense, this must be the fix for the westend nodes that were killed by the keep-alive/health-check services 🙏

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes this is the fix for them.

Copy link
Member Author

Choose a reason for hiding this comment

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

I tested it locally with the archive db. Before my PC was also not able to compact it in any reasonable amount of time.


Ok(db)
})
}

/// Internal api to open a database in primary mode.
Expand Down
Loading