mirror of
https://github.com/romanz/electrs.git
synced 2025-02-24 23:08:39 +01:00
Improve logging at store.rs
This commit is contained in:
parent
75d88fcec1
commit
548de46410
1 changed files with 3 additions and 2 deletions
|
@ -36,7 +36,7 @@ pub struct StoreOptions {
|
|||
impl DBStore {
|
||||
/// Opens a new RocksDB at the specified location.
|
||||
pub fn open(path: &str, opts: StoreOptions) -> DBStore {
|
||||
info!("opening {} with {:?}", path, &opts);
|
||||
debug!("opening {} with {:?}", path, &opts);
|
||||
let mut db_opts = rocksdb::Options::default();
|
||||
db_opts.create_if_missing(true);
|
||||
db_opts.set_compaction_style(rocksdb::DBCompactionStyle::Level);
|
||||
|
@ -63,9 +63,10 @@ impl DBStore {
|
|||
if self.get(key).is_some() {
|
||||
return;
|
||||
}
|
||||
info!("full compaction");
|
||||
info!("starting full compaction");
|
||||
self.db.compact_range(None, None); // should take a while
|
||||
self.db.put(key, b"").unwrap();
|
||||
info!("finished full compaction");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue