mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-03-12 19:11:42 +01:00
Specify WithoutTls everywhere
This commit is contained in:
parent
26f0f1d638
commit
b9da33fcbd
@ -4,7 +4,7 @@ use std::convert::TryInto;
|
|||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use heed::types::*;
|
use heed::{types::*, WithoutTls};
|
||||||
use heed::{CompactionOption, Database, RoTxn, RwTxn, Unspecified};
|
use heed::{CompactionOption, Database, RoTxn, RwTxn, Unspecified};
|
||||||
use roaring::RoaringBitmap;
|
use roaring::RoaringBitmap;
|
||||||
use rstar::RTree;
|
use rstar::RTree;
|
||||||
@ -109,7 +109,7 @@ pub mod db_name {
|
|||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Index {
|
pub struct Index {
|
||||||
/// The LMDB environment which this index is associated with.
|
/// The LMDB environment which this index is associated with.
|
||||||
pub(crate) env: heed::Env,
|
pub(crate) env: heed::Env<WithoutTls>,
|
||||||
|
|
||||||
/// Contains many different types (e.g. the fields ids map).
|
/// Contains many different types (e.g. the fields ids map).
|
||||||
pub(crate) main: Database<Unspecified, Unspecified>,
|
pub(crate) main: Database<Unspecified, Unspecified>,
|
||||||
@ -176,7 +176,7 @@ pub struct Index {
|
|||||||
|
|
||||||
impl Index {
|
impl Index {
|
||||||
pub fn new_with_creation_dates<P: AsRef<Path>>(
|
pub fn new_with_creation_dates<P: AsRef<Path>>(
|
||||||
mut options: heed::EnvOpenOptions,
|
mut options: heed::EnvOpenOptions<WithoutTls>,
|
||||||
path: P,
|
path: P,
|
||||||
created_at: time::OffsetDateTime,
|
created_at: time::OffsetDateTime,
|
||||||
updated_at: time::OffsetDateTime,
|
updated_at: time::OffsetDateTime,
|
||||||
@ -274,7 +274,7 @@ impl Index {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn new<P: AsRef<Path>>(
|
pub fn new<P: AsRef<Path>>(
|
||||||
options: heed::EnvOpenOptions,
|
options: heed::EnvOpenOptions<WithoutTls>,
|
||||||
path: P,
|
path: P,
|
||||||
creation: bool,
|
creation: bool,
|
||||||
) -> Result<Index> {
|
) -> Result<Index> {
|
||||||
@ -283,7 +283,7 @@ impl Index {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn set_creation_dates(
|
fn set_creation_dates(
|
||||||
env: &heed::Env,
|
env: &heed::Env<WithoutTls>,
|
||||||
main: Database<Unspecified, Unspecified>,
|
main: Database<Unspecified, Unspecified>,
|
||||||
created_at: time::OffsetDateTime,
|
created_at: time::OffsetDateTime,
|
||||||
updated_at: time::OffsetDateTime,
|
updated_at: time::OffsetDateTime,
|
||||||
@ -305,12 +305,12 @@ impl Index {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Create a read transaction to be able to read the index.
|
/// Create a read transaction to be able to read the index.
|
||||||
pub fn read_txn(&self) -> heed::Result<RoTxn<'_>> {
|
pub fn read_txn(&self) -> heed::Result<RoTxn<'_, WithoutTls>> {
|
||||||
self.env.read_txn()
|
self.env.read_txn()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a static read transaction to be able to read the index without keeping a reference to it.
|
/// Create a static read transaction to be able to read the index without keeping a reference to it.
|
||||||
pub fn static_read_txn(&self) -> heed::Result<RoTxn<'static>> {
|
pub fn static_read_txn(&self) -> heed::Result<RoTxn<'static, WithoutTls>> {
|
||||||
self.env.clone().static_read_txn()
|
self.env.clone().static_read_txn()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ pub(crate) mod test_helpers {
|
|||||||
|
|
||||||
use grenad::MergerBuilder;
|
use grenad::MergerBuilder;
|
||||||
use heed::types::Bytes;
|
use heed::types::Bytes;
|
||||||
use heed::{BytesDecode, BytesEncode, Env, RoTxn, RwTxn};
|
use heed::{BytesDecode, BytesEncode, Env, RoTxn, RwTxn, WithoutTls};
|
||||||
use roaring::RoaringBitmap;
|
use roaring::RoaringBitmap;
|
||||||
|
|
||||||
use super::bulk::FacetsUpdateBulkInner;
|
use super::bulk::FacetsUpdateBulkInner;
|
||||||
@ -339,7 +339,7 @@ pub(crate) mod test_helpers {
|
|||||||
for<'a> BoundCodec:
|
for<'a> BoundCodec:
|
||||||
BytesEncode<'a> + BytesDecode<'a, DItem = <BoundCodec as BytesEncode<'a>>::EItem>,
|
BytesEncode<'a> + BytesDecode<'a, DItem = <BoundCodec as BytesEncode<'a>>::EItem>,
|
||||||
{
|
{
|
||||||
pub env: Env,
|
pub env: Env<WithoutTls>,
|
||||||
pub content: heed::Database<FacetGroupKeyCodec<BytesRefCodec>, FacetGroupValueCodec>,
|
pub content: heed::Database<FacetGroupKeyCodec<BytesRefCodec>, FacetGroupValueCodec>,
|
||||||
pub group_size: Cell<u8>,
|
pub group_size: Cell<u8>,
|
||||||
pub min_level_size: Cell<u8>,
|
pub min_level_size: Cell<u8>,
|
||||||
|
@ -3,7 +3,7 @@ use std::sync::atomic::Ordering;
|
|||||||
use std::sync::{Arc, RwLock};
|
use std::sync::{Arc, RwLock};
|
||||||
|
|
||||||
use bumpalo::Bump;
|
use bumpalo::Bump;
|
||||||
use heed::RoTxn;
|
use heed::{RoTxn, WithoutTls};
|
||||||
use rayon::iter::IndexedParallelIterator;
|
use rayon::iter::IndexedParallelIterator;
|
||||||
|
|
||||||
use super::super::document_change::DocumentChange;
|
use super::super::document_change::DocumentChange;
|
||||||
@ -28,7 +28,7 @@ pub struct DocumentChangeContext<
|
|||||||
/// inside of the DB.
|
/// inside of the DB.
|
||||||
pub db_fields_ids_map: &'indexer FieldsIdsMap,
|
pub db_fields_ids_map: &'indexer FieldsIdsMap,
|
||||||
/// A transaction providing data from the DB before all indexing operations
|
/// A transaction providing data from the DB before all indexing operations
|
||||||
pub rtxn: RoTxn<'indexer>,
|
pub rtxn: RoTxn<'indexer, WithoutTls>,
|
||||||
|
|
||||||
/// Global field id map that is up to date with the current state of the indexing process.
|
/// Global field id map that is up to date with the current state of the indexing process.
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user