From de59ea495d5d8eeddfcfb90263762cea35a27f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sun, 6 Jan 2019 18:09:30 +0100 Subject: [PATCH] feat: Log some update steps --- src/database/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/database/mod.rs b/src/database/mod.rs index bc86eede6..db6413fb1 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -7,6 +7,7 @@ use rocksdb::rocksdb_options::{DBOptions, IngestExternalFileOptions, ColumnFamil use rocksdb::rocksdb::{Writable, Snapshot}; use rocksdb::{DB, DBVector, MergeOperands}; use crossbeam::atomic::ArcCell; +use log::debug; pub use self::document_key::{DocumentKey, DocumentKeyAttr}; pub use self::view::{DatabaseView, DocumentIter}; @@ -147,9 +148,11 @@ impl Database { let options = IngestExternalFileOptions::new(); // options.move_files(move_update); + debug!("ingest update file"); let cf_handle = db.cf_handle("default").expect("\"default\" column family not found"); db.ingest_external_file_optimized(&cf_handle, &options, &[&path])?; + debug!("compacting index range"); // Compacting to trigger the merge operator only one time // while ingesting the update and not each time searching db.compact_range(Some(DATA_INDEX), Some(DATA_INDEX));