mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-04 20:18:55 +01:00
Change the UpdateStore internal meta serializer
This commit is contained in:
parent
f948a03be2
commit
16ab3e02a9
@ -2,7 +2,7 @@ use std::path::Path;
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use crossbeam_channel::Sender;
|
use crossbeam_channel::Sender;
|
||||||
use heed::types::{OwnedType, DecodeIgnore, SerdeJson, ByteSlice};
|
use heed::types::{OwnedType, DecodeIgnore, SerdeBincode, ByteSlice};
|
||||||
use heed::{EnvOpenOptions, Env, Database};
|
use heed::{EnvOpenOptions, Env, Database};
|
||||||
use serde::{Serialize, Deserialize};
|
use serde::{Serialize, Deserialize};
|
||||||
|
|
||||||
@ -11,9 +11,9 @@ use crate::BEU64;
|
|||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct UpdateStore<M> {
|
pub struct UpdateStore<M> {
|
||||||
env: Env,
|
env: Env,
|
||||||
pending_meta: Database<OwnedType<BEU64>, SerdeJson<M>>,
|
pending_meta: Database<OwnedType<BEU64>, SerdeBincode<M>>,
|
||||||
pending: Database<OwnedType<BEU64>, ByteSlice>,
|
pending: Database<OwnedType<BEU64>, ByteSlice>,
|
||||||
processed_meta: Database<OwnedType<BEU64>, SerdeJson<M>>,
|
processed_meta: Database<OwnedType<BEU64>, SerdeBincode<M>>,
|
||||||
notification_sender: Sender<()>,
|
notification_sender: Sender<()>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,8 +153,8 @@ impl<M: 'static> UpdateStore<M> {
|
|||||||
where
|
where
|
||||||
M: for<'a> Deserialize<'a>,
|
M: for<'a> Deserialize<'a>,
|
||||||
F: for<'a> FnMut(
|
F: for<'a> FnMut(
|
||||||
heed::RoIter<'a, OwnedType<BEU64>, SerdeJson<M>>,
|
heed::RoIter<'a, OwnedType<BEU64>, SerdeBincode<M>>,
|
||||||
heed::RoIter<'a, OwnedType<BEU64>, SerdeJson<M>>,
|
heed::RoIter<'a, OwnedType<BEU64>, SerdeBincode<M>>,
|
||||||
) -> heed::Result<T>,
|
) -> heed::Result<T>,
|
||||||
{
|
{
|
||||||
let rtxn = self.env.read_txn()?;
|
let rtxn = self.env.read_txn()?;
|
||||||
|
Loading…
Reference in New Issue
Block a user