mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
fix uuid store size
This commit is contained in:
parent
539a57026d
commit
bcaee4d179
@ -70,9 +70,8 @@ where U: UuidStore,
|
|||||||
Ok(indexes)
|
Ok(indexes)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn get_size(&self) -> Result<u64> {
|
pub async fn get_uuids_size(&self) -> Result<u64> {
|
||||||
todo!()
|
Ok(self.index_uuid_store.get_size().await?)
|
||||||
//Ok(self.index_store.get_size()? + self.index_uuid_store.get_size().await?)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn snapshot(&self, path: impl AsRef<Path>) -> Result<Vec<Index>> {
|
pub async fn snapshot(&self, path: impl AsRef<Path>) -> Result<Vec<Index>> {
|
||||||
|
@ -499,11 +499,6 @@ impl IndexController {
|
|||||||
Ok(meta)
|
Ok(meta)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn get_uuids_size(&self) -> Result<u64> {
|
|
||||||
let size = self.index_resolver.get_size().await?;
|
|
||||||
Ok(size)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn get_index_stats(&self, uid: String) -> Result<IndexStats> {
|
pub async fn get_index_stats(&self, uid: String) -> Result<IndexStats> {
|
||||||
let update_infos = UpdateMsg::get_info(&self.update_sender).await?;
|
let update_infos = UpdateMsg::get_info(&self.update_sender).await?;
|
||||||
let index = self.index_resolver.get_index(uid).await?;
|
let index = self.index_resolver.get_index(uid).await?;
|
||||||
@ -516,7 +511,7 @@ impl IndexController {
|
|||||||
|
|
||||||
pub async fn get_all_stats(&self) -> Result<Stats> {
|
pub async fn get_all_stats(&self) -> Result<Stats> {
|
||||||
let update_infos = UpdateMsg::get_info(&self.update_sender).await?;
|
let update_infos = UpdateMsg::get_info(&self.update_sender).await?;
|
||||||
let mut database_size = self.get_uuids_size().await? + update_infos.size;
|
let mut database_size = self.index_resolver.get_uuids_size().await? + update_infos.size;
|
||||||
let mut last_update: Option<DateTime<_>> = None;
|
let mut last_update: Option<DateTime<_>> = None;
|
||||||
let mut indexes = BTreeMap::new();
|
let mut indexes = BTreeMap::new();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user