mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Merge remote-tracking branch 'origin/main' into temp-wildcard
This commit is contained in:
commit
4570d5bf3a
164 changed files with 8353 additions and 2473 deletions
|
@ -3,7 +3,6 @@ use std::cmp::Reverse;
|
|||
use std::collections::HashSet;
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
use std::fs::create_dir_all;
|
||||
use std::ops::Deref;
|
||||
use std::path::Path;
|
||||
use std::str;
|
||||
use std::sync::Arc;
|
||||
|
@ -61,6 +60,11 @@ impl HeedAuthStore {
|
|||
Ok(Self { env, keys, action_keyid_index_expiration, should_close_on_drop: true })
|
||||
}
|
||||
|
||||
/// Return the size in bytes of database
|
||||
pub fn size(&self) -> Result<u64> {
|
||||
Ok(self.env.real_disk_size()?)
|
||||
}
|
||||
|
||||
pub fn set_drop_on_close(&mut self, v: bool) {
|
||||
self.should_close_on_drop = v;
|
||||
}
|
||||
|
@ -135,7 +139,7 @@ impl HeedAuthStore {
|
|||
for index in key.indexes.iter() {
|
||||
db.put(
|
||||
&mut wtxn,
|
||||
&(&uid, &action, Some(index.deref().as_bytes())),
|
||||
&(&uid, &action, Some(index.to_string().as_bytes())),
|
||||
&key.expires_at,
|
||||
)?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue