mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Move to zerocopy-lmdb
This commit is contained in:
parent
c332c7bc70
commit
1667e1b32f
25 changed files with 450 additions and 684 deletions
|
@ -1,21 +1,22 @@
|
|||
use zlmdb::Result as ZResult;
|
||||
use crate::update::{Update, next_update_id};
|
||||
use crate::{store, MResult};
|
||||
use crate::store;
|
||||
|
||||
pub fn apply_customs_update(
|
||||
writer: &mut rkv::Writer,
|
||||
writer: &mut zlmdb::RwTxn,
|
||||
main_store: store::Main,
|
||||
customs: &[u8],
|
||||
) -> MResult<()>
|
||||
) -> ZResult<()>
|
||||
{
|
||||
main_store.put_customs(writer, customs)
|
||||
}
|
||||
|
||||
pub fn push_customs_update(
|
||||
writer: &mut rkv::Writer,
|
||||
writer: &mut zlmdb::RwTxn,
|
||||
updates_store: store::Updates,
|
||||
updates_results_store: store::UpdatesResults,
|
||||
customs: Vec<u8>,
|
||||
) -> MResult<u64>
|
||||
) -> ZResult<u64>
|
||||
{
|
||||
let last_update_id = next_update_id(writer, updates_store, updates_results_store)?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue