mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-18 08:48:32 +08:00
Make easier to interact with compacted databases
This commit is contained in:
parent
ebf620c7f9
commit
f873761a27
@ -195,8 +195,9 @@ fn index_command(command: IndexCommand, database: Database) -> Result<(), Box<dy
|
|||||||
);
|
);
|
||||||
|
|
||||||
if let Some(path) = command.compact_to_path {
|
if let Some(path) = command.compact_to_path {
|
||||||
|
fs::create_dir_all(&path)?;
|
||||||
let start = Instant::now();
|
let start = Instant::now();
|
||||||
let _file = database.copy_and_compact_to_path(&path)?;
|
let _file = database.copy_and_compact_to_path(path.join("data.mdb"))?;
|
||||||
println!(
|
println!(
|
||||||
"database compacted in {:.2?} at: {:?}",
|
"database compacted in {:.2?} at: {:?}",
|
||||||
start.elapsed(),
|
start.elapsed(),
|
||||||
|
Loading…
Reference in New Issue
Block a user