diff --git a/ledger/src/blockstore.rs b/ledger/src/blockstore.rs
index c5733d6a3..e97f005d3 100644
--- a/ledger/src/blockstore.rs
+++ b/ledger/src/blockstore.rs
@@ -516,10 +516,19 @@ impl Blockstore {
}
}
+ /// Whether to disable compaction in [`compact_storage`], which is used
+ /// by the ledger cleanup service and [`backup_and_clear_blockstore`].
+ ///
+ /// Note that this setting is not related to the RocksDB's background
+ /// compaction.
+ ///
+ /// To disable RocksDB's background compaction, open the Blockstore
+ /// with AccessType::PrimaryOnlyForMaintenance.
pub fn set_no_compaction(&mut self, no_compaction: bool) {
self.no_compaction = no_compaction;
}
+ /// Deletes the blockstore at the specified path.
pub fn destroy(ledger_path: &Path) -> Result<()> {
// Database::destroy() fails if the path doesn't exist
fs::create_dir_all(ledger_path)?;
@@ -527,10 +536,12 @@ impl Blockstore {
Database::destroy(&blockstore_path)
}
+ /// Returns the SlotMeta of the specified slot.
pub fn meta(&self, slot: Slot) -> Result