mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-10-10 13:46:28 +00:00
Improve the pre-compaction size information
This commit is contained in:
committed by
Kerollmops
parent
9068857ba1
commit
f358538f4f
@@ -551,8 +551,8 @@ impl IndexScheduler {
|
|||||||
// 2. We retrieve the index and create a temporary file in the index directory
|
// 2. We retrieve the index and create a temporary file in the index directory
|
||||||
progress.update_progress(IndexCompaction::RetrieveTheIndex);
|
progress.update_progress(IndexCompaction::RetrieveTheIndex);
|
||||||
let index = self.index_mapper.index(rtxn, index_uid)?;
|
let index = self.index_mapper.index(rtxn, index_uid)?;
|
||||||
let pre_size = index.map_size() as u64;
|
|
||||||
progress.update_progress(IndexCompaction::CreateTemporaryFile);
|
progress.update_progress(IndexCompaction::CreateTemporaryFile);
|
||||||
|
let pre_size = std::fs::metadata(index.path().join("data.mdb"))?.len();
|
||||||
let mut file = tempfile::Builder::new()
|
let mut file = tempfile::Builder::new()
|
||||||
.suffix("data.")
|
.suffix("data.")
|
||||||
.prefix(".mdb.cpy")
|
.prefix(".mdb.cpy")
|
||||||
|
Reference in New Issue
Block a user