mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
enable jemalloc only on linux
This commit is contained in:
parent
c61fab1435
commit
49b74b587a
@ -81,5 +81,5 @@ urlencoding = "1.1.1"
|
||||
[features]
|
||||
default = ["sentry"]
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
jemallocator = "0.3.2"
|
||||
|
@ -14,9 +14,8 @@ use actix_web::web::{Bytes, Payload};
|
||||
use futures::stream::StreamExt;
|
||||
use milli::update::{IndexDocumentsMethod, UpdateFormat};
|
||||
use serde::{Serialize, Deserialize};
|
||||
use tokio::sync::{mpsc, oneshot};
|
||||
use tokio::sync::mpsc;
|
||||
use tokio::time::sleep;
|
||||
use uuid::Uuid;
|
||||
|
||||
pub use updates::{Processed, Processing, Failed};
|
||||
use crate::index::{SearchResult, SearchQuery, Document};
|
||||
@ -59,15 +58,6 @@ pub struct IndexController {
|
||||
update_handle: update_actor::UpdateActorHandle<Bytes>,
|
||||
}
|
||||
|
||||
enum IndexControllerMsg {
|
||||
CreateIndex {
|
||||
uuid: Uuid,
|
||||
primary_key: Option<String>,
|
||||
ret: oneshot::Sender<anyhow::Result<IndexMetadata>>,
|
||||
},
|
||||
Shutdown,
|
||||
}
|
||||
|
||||
impl IndexController {
|
||||
pub fn new(path: impl AsRef<Path>) -> anyhow::Result<Self> {
|
||||
let uuid_resolver = uuid_resolver::UuidResolverHandle::new(&path)?;
|
||||
@ -94,10 +84,10 @@ impl IndexController {
|
||||
tokio::task::spawn_local(async move {
|
||||
while let Some(bytes) = payload.next().await {
|
||||
match bytes {
|
||||
Ok(bytes) => { sender.send(Ok(bytes)).await; },
|
||||
Ok(bytes) => { let _ = sender.send(Ok(bytes)).await; },
|
||||
Err(e) => {
|
||||
let error: Box<dyn std::error::Error + Sync + Send + 'static> = Box::new(e);
|
||||
sender.send(Err(error)).await; },
|
||||
let _ = sender.send(Err(error)).await; },
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -144,8 +144,6 @@ where
|
||||
.await
|
||||
.map_err(|e| UpdateError::Error(Box::new(e)))?;
|
||||
|
||||
let file = file.into_std().await;
|
||||
|
||||
tokio::task::spawn_blocking(move || {
|
||||
let result = update_store
|
||||
.register_update(meta, path, uuid)
|
||||
|
@ -1,8 +1,3 @@
|
||||
#![allow(clippy::or_fun_call)]
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(unused_variables)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
pub mod data;
|
||||
pub mod error;
|
||||
pub mod helpers;
|
||||
|
Loading…
Reference in New Issue
Block a user