Move PurgeType enum to blockstore_purge.rs (#24185)
This commit is contained in:
@ -68,13 +68,13 @@ use {
|
|||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
trees::{Tree, TreeWalk},
|
trees::{Tree, TreeWalk},
|
||||||
};
|
};
|
||||||
|
pub mod blockstore_purge;
|
||||||
pub use {
|
pub use {
|
||||||
crate::{blockstore_db::BlockstoreError, blockstore_meta::SlotMeta},
|
crate::{blockstore_db::BlockstoreError, blockstore_meta::SlotMeta},
|
||||||
|
blockstore_purge::PurgeType,
|
||||||
rocksdb::properties as RocksProperties,
|
rocksdb::properties as RocksProperties,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub mod blockstore_purge;
|
|
||||||
|
|
||||||
pub const BLOCKSTORE_DIRECTORY_ROCKS_LEVEL: &str = "rocksdb";
|
pub const BLOCKSTORE_DIRECTORY_ROCKS_LEVEL: &str = "rocksdb";
|
||||||
pub const BLOCKSTORE_DIRECTORY_ROCKS_FIFO: &str = "rocksdb_fifo";
|
pub const BLOCKSTORE_DIRECTORY_ROCKS_FIFO: &str = "rocksdb_fifo";
|
||||||
|
|
||||||
@ -110,20 +110,6 @@ pub struct SignatureInfosForAddress {
|
|||||||
pub found_before: bool,
|
pub found_before: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy)]
|
|
||||||
/// Controls how `blockstore::purge_slots` purges the data.
|
|
||||||
pub enum PurgeType {
|
|
||||||
/// A slower but more accurate way to purge slots by also ensuring higher
|
|
||||||
/// level of consistency between data during the clean up process.
|
|
||||||
Exact,
|
|
||||||
/// A faster approximation of `Exact` where the purge process only takes
|
|
||||||
/// care of the primary index and does not update the associated entries.
|
|
||||||
PrimaryIndex,
|
|
||||||
/// The fastest purge mode that relies on the slot-id based TTL
|
|
||||||
/// compaction filter to do the cleanup.
|
|
||||||
CompactionFilter,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Error, Debug)]
|
#[derive(Error, Debug)]
|
||||||
pub enum InsertDataShredError {
|
pub enum InsertDataShredError {
|
||||||
Exists,
|
Exists,
|
||||||
|
@ -6,6 +6,20 @@ pub struct PurgeStats {
|
|||||||
write_batch: u64,
|
write_batch: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Copy)]
|
||||||
|
/// Controls how `blockstore::purge_slots` purges the data.
|
||||||
|
pub enum PurgeType {
|
||||||
|
/// A slower but more accurate way to purge slots by also ensuring higher
|
||||||
|
/// level of consistency between data during the clean up process.
|
||||||
|
Exact,
|
||||||
|
/// A faster approximation of `Exact` where the purge process only takes
|
||||||
|
/// care of the primary index and does not update the associated entries.
|
||||||
|
PrimaryIndex,
|
||||||
|
/// The fastest purge mode that relies on the slot-id based TTL
|
||||||
|
/// compaction filter to do the cleanup.
|
||||||
|
CompactionFilter,
|
||||||
|
}
|
||||||
|
|
||||||
impl Blockstore {
|
impl Blockstore {
|
||||||
/// Performs cleanup based on the specified deletion range. After this
|
/// Performs cleanup based on the specified deletion range. After this
|
||||||
/// function call, entries within \[`from_slot`, `to_slot`\] will become
|
/// function call, entries within \[`from_slot`, `to_slot`\] will become
|
||||||
|
Reference in New Issue
Block a user