From 21bbbdec76781da58daae7fef9d67b9aaafb4e9c Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Mon, 10 Mar 2025 15:41:53 +0100 Subject: [PATCH] Specify WithoutTls everywhere --- crates/milli/src/index.rs | 14 +++++++------- crates/milli/src/update/facet/mod.rs | 4 ++-- .../src/update/new/indexer/document_changes.rs | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/milli/src/index.rs b/crates/milli/src/index.rs index 4218d727d..1874d255d 100644 --- a/crates/milli/src/index.rs +++ b/crates/milli/src/index.rs @@ -3,7 +3,7 @@ use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; use std::fs::File; use std::path::Path; -use heed::types::*; +use heed::{types::*, WithoutTls}; use heed::{CompactionOption, Database, RoTxn, RwTxn, Unspecified}; use roaring::RoaringBitmap; use rstar::RTree; @@ -110,7 +110,7 @@ pub mod db_name { #[derive(Clone)] pub struct Index { /// The LMDB environment which this index is associated with. - pub(crate) env: heed::Env, + pub(crate) env: heed::Env, /// Contains many different types (e.g. the fields ids map). pub(crate) main: Database, @@ -177,7 +177,7 @@ pub struct Index { impl Index { pub fn new_with_creation_dates>( - mut options: heed::EnvOpenOptions, + mut options: heed::EnvOpenOptions, path: P, created_at: time::OffsetDateTime, updated_at: time::OffsetDateTime, @@ -275,7 +275,7 @@ impl Index { } pub fn new>( - options: heed::EnvOpenOptions, + options: heed::EnvOpenOptions, path: P, creation: bool, ) -> Result { @@ -284,7 +284,7 @@ impl Index { } fn set_creation_dates( - env: &heed::Env, + env: &heed::Env, main: Database, created_at: time::OffsetDateTime, updated_at: time::OffsetDateTime, @@ -306,12 +306,12 @@ impl Index { } /// Create a read transaction to be able to read the index. - pub fn read_txn(&self) -> heed::Result> { + pub fn read_txn(&self) -> heed::Result> { self.env.read_txn() } /// 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> { + pub fn static_read_txn(&self) -> heed::Result> { self.env.clone().static_read_txn() } diff --git a/crates/milli/src/update/facet/mod.rs b/crates/milli/src/update/facet/mod.rs index 5b1354094..c40916670 100644 --- a/crates/milli/src/update/facet/mod.rs +++ b/crates/milli/src/update/facet/mod.rs @@ -352,7 +352,7 @@ pub(crate) mod test_helpers { use grenad::MergerBuilder; use heed::types::Bytes; - use heed::{BytesDecode, BytesEncode, Env, RoTxn, RwTxn}; + use heed::{BytesDecode, BytesEncode, Env, RoTxn, RwTxn, WithoutTls}; use roaring::RoaringBitmap; use super::bulk::FacetsUpdateBulkInner; @@ -390,7 +390,7 @@ pub(crate) mod test_helpers { for<'a> BoundCodec: BytesEncode<'a> + BytesDecode<'a, DItem = >::EItem>, { - pub env: Env, + pub env: Env, pub content: heed::Database, FacetGroupValueCodec>, pub group_size: Cell, pub min_level_size: Cell, diff --git a/crates/milli/src/update/new/indexer/document_changes.rs b/crates/milli/src/update/new/indexer/document_changes.rs index f77ac7658..a2388a662 100644 --- a/crates/milli/src/update/new/indexer/document_changes.rs +++ b/crates/milli/src/update/new/indexer/document_changes.rs @@ -3,7 +3,7 @@ use std::sync::atomic::Ordering; use std::sync::{Arc, RwLock}; use bumpalo::Bump; -use heed::RoTxn; +use heed::{RoTxn, WithoutTls}; use rayon::iter::IndexedParallelIterator; use super::super::document_change::DocumentChange; @@ -28,7 +28,7 @@ pub struct DocumentChangeContext< /// inside of the DB. pub db_fields_ids_map: &'indexer FieldsIdsMap, /// 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. ///