Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/new_index/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,23 @@ impl Indexer {
self.start_auto_compactions(&self.store.cache_db);

if let DBFlush::Disable = self.flush {
debug!("flushing to disk");
let t = std::time::Instant::now();
debug!("flushing txstore_db to disk");
self.store.txstore_db.flush();
debug!("flushing txstore_db complete in {:.1?}", t.elapsed());

let t = std::time::Instant::now();
debug!("flushing history_db to disk");
self.store.history_db.flush();
debug!("flushing history_db complete in {:.1?}", t.elapsed());

// cache_db receives WAL-disabled writes when --address-search is enabled,
// so it needs the same explicit flush to ensure durability.
let t = std::time::Instant::now();
debug!("flushing cache_db to disk");
self.store.cache_db.flush();
debug!("flushing cache_db complete in {:.1?}", t.elapsed());

self.flush = DBFlush::Enable;
}

Expand Down