Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
chore: adding compaction on DB open (#456)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Paitrault <[email protected]>
  • Loading branch information
Freyskeyd committed Feb 15, 2024
1 parent ce8ca68 commit a1de6f8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions crates/topos-tce-storage/src/validator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,21 @@ impl ValidatorStore {
fullnode_store,
});

store.pending_tables.pending_pool.rocksdb.compact_range_cf(
&store.pending_tables.pending_pool.cf()?,
None::<&[u8]>,
None::<&[u8]>,
);
store
.pending_tables
.precedence_pool
.rocksdb
.compact_range_cf(
&store.pending_tables.precedence_pool.cf()?,
None::<&[u8]>,
None::<&[u8]>,
);

let pending_count: i64 =
store
.count_pending_certificates()?
Expand Down

0 comments on commit a1de6f8

Please sign in to comment.