Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
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
Prev Previous commit
Review comments
  • Loading branch information
bkchr committed Feb 18, 2023
commit adb50cf58e7bd9fab066fdc3b9d5f6ee6266346c
12 changes: 6 additions & 6 deletions client/state-db/src/pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,15 +321,15 @@ impl<BlockHash: Hash, Key: Hash, D: MetaDb> RefWindow<BlockHash, Key, D> {

let queue = if count_insertions {
// Highly scientific crafted number for deciding when to print the warning!
//
// Rocksdb doesn't support refcounting and requires that we load the entire pruning
// window into the memory.
if window_size > 1000 {
log::warn!(
target: LOG_TARGET,
"Detected large pruning window of {window_size} blocks while running with a database \n
that isn't supporting ref counting, e.g. RocksDb. \n\
This means that all the blocks in the pruning window are stored in memory which \n\
may leads to a high memory usage and to possible out of memory crashes. \n\
Use for example ParityDb to not store the entire pruning window in memory.\
");
"Large pruning window of {window_size} detected! THIS CAN LEAD TO HIGH MEMORY USAGE AND CRASHES. \
Reduce the pruning window or switch your database to paritydb."
);
}

DeathRowQueue::new_mem(&db, base)?
Expand Down