Purge expired BlockHeight data from blockstore (#17634)
* Purge expired BlockHeight data from blockstore * Also call compact_storage and add comment....
This commit is contained in:
@ -178,6 +178,10 @@ impl Blockstore {
|
||||
& self
|
||||
.db
|
||||
.delete_range_cf::<cf::PerfSamples>(&mut write_batch, from_slot, to_slot)
|
||||
.is_ok()
|
||||
& self
|
||||
.db
|
||||
.delete_range_cf::<cf::BlockHeight>(&mut write_batch, from_slot, to_slot)
|
||||
.is_ok();
|
||||
let mut w_active_transaction_status_index =
|
||||
self.active_transaction_status_index.write().unwrap();
|
||||
@ -287,6 +291,10 @@ impl Blockstore {
|
||||
&& self
|
||||
.perf_samples_cf
|
||||
.compact_range(from_slot, to_slot)
|
||||
.unwrap_or(false)
|
||||
&& self
|
||||
.block_height_cf
|
||||
.compact_range(from_slot, to_slot)
|
||||
.unwrap_or(false);
|
||||
compact_timer.stop();
|
||||
if !result {
|
||||
|
@ -340,6 +340,8 @@ impl Rocks {
|
||||
BlockHeight::NAME,
|
||||
get_cf_options::<BlockHeight>(&access_type, &oldest_slot),
|
||||
);
|
||||
// Don't forget to add to both run_purge_with_stats() and
|
||||
// compact_storage() in ledger/src/blockstore/blockstore_purge.rs!!
|
||||
|
||||
let cfs = vec![
|
||||
(SlotMeta::NAME, meta_cf_descriptor),
|
||||
|
Reference in New Issue
Block a user