4332: Update the dependencies r=irevoire a=Kerollmops

This PR upgrades the dependencies and fixes #4287.

 - ~We keep arroy at the current commit. We will release and use the latest version published when possible~
 - We also updated arroy to 0.2.0.
 - I rolled back the version of rustls has too many breaking changes.
 - I had to keep HTTP to 0.2.11 due to actix-cors.

Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
meili-bors[bot] 2024-01-17 13:42:02 +00:00 committed by GitHub
commit 3b8a9597e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 599 additions and 543 deletions

View File

@ -66,6 +66,10 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Cache dependencies - name: Cache dependencies
uses: Swatinem/rust-cache@v2.7.1 uses: Swatinem/rust-cache@v2.7.1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run cargo check without any default features - name: Run cargo check without any default features
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
@ -164,7 +168,7 @@ jobs:
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: 1.71.1 toolchain: 1.75.0
override: true override: true
components: clippy components: clippy
- name: Cache dependencies - name: Cache dependencies

740
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
# Compile # Compile
FROM rust:1.71.1-alpine3.18 AS compiler FROM rust:1.75.0-alpine3.18 AS compiler
RUN apk add -q --update-cache --no-cache build-base openssl-dev RUN apk add -q --update-cache --no-cache build-base openssl-dev

View File

@ -11,24 +11,24 @@ edition.workspace = true
license.workspace = true license.workspace = true
[dependencies] [dependencies]
anyhow = "1.0.70" anyhow = "1.0.79"
csv = "1.2.1" csv = "1.3.0"
milli = { path = "../milli" } milli = { path = "../milli" }
mimalloc = { version = "0.1.37", default-features = false } mimalloc = { version = "0.1.39", default-features = false }
serde_json = { version = "1.0.95", features = ["preserve_order"] } serde_json = { version = "1.0.111", features = ["preserve_order"] }
[dev-dependencies] [dev-dependencies]
criterion = { version = "0.5.1", features = ["html_reports"] } criterion = { version = "0.5.1", features = ["html_reports"] }
rand = "0.8.5" rand = "0.8.5"
rand_chacha = "0.3.1" rand_chacha = "0.3.1"
roaring = "0.10.1" roaring = "0.10.2"
[build-dependencies] [build-dependencies]
anyhow = "1.0.70" anyhow = "1.0.79"
bytes = "1.4.0" bytes = "1.5.0"
convert_case = "0.6.0" convert_case = "0.6.0"
flate2 = "1.0.25" flate2 = "1.0.28"
reqwest = { version = "0.11.16", features = ["blocking", "rustls-tls"], default-features = false } reqwest = { version = "0.11.23", features = ["blocking", "rustls-tls"], default-features = false }
[features] [features]
default = ["milli/all-tokenizations"] default = ["milli/all-tokenizations"]

View File

@ -11,22 +11,22 @@ readme.workspace = true
license.workspace = true license.workspace = true
[dependencies] [dependencies]
anyhow = "1.0.70" anyhow = "1.0.79"
flate2 = "1.0.25" flate2 = "1.0.28"
http = "0.2.9" http = "0.2.11"
log = "0.4.17" log = "0.4.20"
meilisearch-auth = { path = "../meilisearch-auth" } meilisearch-auth = { path = "../meilisearch-auth" }
meilisearch-types = { path = "../meilisearch-types" } meilisearch-types = { path = "../meilisearch-types" }
once_cell = "1.17.1" once_cell = "1.19.0"
regex = "1.7.3" regex = "1.10.2"
roaring = { version = "0.10.1", features = ["serde"] } roaring = { version = "0.10.2", features = ["serde"] }
serde = { version = "1.0.160", features = ["derive"] } serde = { version = "1.0.195", features = ["derive"] }
serde_json = { version = "1.0.95", features = ["preserve_order"] } serde_json = { version = "1.0.111", features = ["preserve_order"] }
tar = "0.4.38" tar = "0.4.40"
tempfile = "3.5.0" tempfile = "3.9.0"
thiserror = "1.0.40" thiserror = "1.0.56"
time = { version = "0.3.20", features = ["serde-well-known", "formatting", "parsing", "macros"] } time = { version = "0.3.31", features = ["serde-well-known", "formatting", "parsing", "macros"] }
uuid = { version = "1.3.1", features = ["serde", "v4"] } uuid = { version = "1.6.1", features = ["serde", "v4"] }
[dev-dependencies] [dev-dependencies]
big_s = "1.0.2" big_s = "1.0.2"

View File

@ -1,5 +1,6 @@
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[allow(clippy::enum_variant_names)]
#[derive(Serialize, Deserialize, Debug, Clone, Copy)] #[derive(Serialize, Deserialize, Debug, Clone, Copy)]
pub enum Code { pub enum Code {
// index related error // index related error

View File

@ -95,6 +95,7 @@ impl fmt::Display for ErrorType {
} }
} }
#[allow(clippy::enum_variant_names)]
#[derive(Serialize, Deserialize, Debug, Clone, Copy)] #[derive(Serialize, Deserialize, Debug, Clone, Copy)]
pub enum Code { pub enum Code {
// index related error // index related error

View File

@ -31,6 +31,7 @@ impl ResponseError {
} }
} }
#[allow(clippy::enum_variant_names)]
#[derive(Deserialize, Debug, Clone, Copy)] #[derive(Deserialize, Debug, Clone, Copy)]
#[cfg_attr(test, derive(serde::Serialize))] #[cfg_attr(test, derive(serde::Serialize))]
pub enum Code { pub enum Code {

View File

@ -11,9 +11,9 @@ edition.workspace = true
license.workspace = true license.workspace = true
[dependencies] [dependencies]
tempfile = "3.5.0" tempfile = "3.9.0"
thiserror = "1.0.40" thiserror = "1.0.56"
uuid = { version = "1.3.1", features = ["serde", "v4"] } uuid = { version = "1.6.1", features = ["serde", "v4"] }
[dev-dependencies] [dev-dependencies]
faux = "0.1.9" faux = "0.1.10"

View File

@ -13,8 +13,8 @@ license.workspace = true
[dependencies] [dependencies]
nom = "7.1.3" nom = "7.1.3"
nom_locate = "4.1.0" nom_locate = "4.2.0"
unescaper = "0.1.2" unescaper = "0.1.3"
[dev-dependencies] [dev-dependencies]
insta = "1.29.0" insta = "1.34.0"

View File

@ -11,10 +11,10 @@ edition.workspace = true
license.workspace = true license.workspace = true
[dependencies] [dependencies]
arbitrary = { version = "1.3.0", features = ["derive"] } arbitrary = { version = "1.3.2", features = ["derive"] }
clap = { version = "4.3.0", features = ["derive"] } clap = { version = "4.4.17", features = ["derive"] }
fastrand = "2.0.0" fastrand = "2.0.1"
milli = { path = "../milli" } milli = { path = "../milli" }
serde = { version = "1.0.160", features = ["derive"] } serde = { version = "1.0.195", features = ["derive"] }
serde_json = { version = "1.0.95", features = ["preserve_order"] } serde_json = { version = "1.0.111", features = ["preserve_order"] }
tempfile = "3.5.0" tempfile = "3.9.0"

View File

@ -11,32 +11,32 @@ edition.workspace = true
license.workspace = true license.workspace = true
[dependencies] [dependencies]
anyhow = "1.0.70" anyhow = "1.0.79"
bincode = "1.3.3" bincode = "1.3.3"
csv = "1.2.1" csv = "1.3.0"
derive_builder = "0.12.0" derive_builder = "0.12.0"
dump = { path = "../dump" } dump = { path = "../dump" }
enum-iterator = "1.4.0" enum-iterator = "1.5.0"
file-store = { path = "../file-store" } file-store = { path = "../file-store" }
flate2 = "1.0.28" flate2 = "1.0.28"
log = "0.4.17" log = "0.4.20"
meilisearch-auth = { path = "../meilisearch-auth" } meilisearch-auth = { path = "../meilisearch-auth" }
meilisearch-types = { path = "../meilisearch-types" } meilisearch-types = { path = "../meilisearch-types" }
page_size = "0.5.0" page_size = "0.5.0"
puffin = { version = "0.16.0", features = ["serialization"] } puffin = { version = "0.16.0", features = ["serialization"] }
roaring = { version = "0.10.1", features = ["serde"] } roaring = { version = "0.10.2", features = ["serde"] }
serde = { version = "1.0.160", features = ["derive"] } serde = { version = "1.0.195", features = ["derive"] }
serde_json = { version = "1.0.95", features = ["preserve_order"] } serde_json = { version = "1.0.111", features = ["preserve_order"] }
synchronoise = "1.0.1" synchronoise = "1.0.1"
tempfile = "3.5.0" tempfile = "3.9.0"
thiserror = "1.0.40" thiserror = "1.0.56"
time = { version = "0.3.20", features = ["serde-well-known", "formatting", "parsing", "macros"] } time = { version = "0.3.31", features = ["serde-well-known", "formatting", "parsing", "macros"] }
ureq = "2.9.1" ureq = "2.9.1"
uuid = { version = "1.3.1", features = ["serde", "v4"] } uuid = { version = "1.6.1", features = ["serde", "v4"] }
[dev-dependencies] [dev-dependencies]
big_s = "1.0.2" big_s = "1.0.2"
crossbeam = "0.8.2" crossbeam = "0.8.4"
insta = { version = "1.29.0", features = ["json", "redactions"] } insta = { version = "1.34.0", features = ["json", "redactions"] }
meili-snap = { path = "../meili-snap" } meili-snap = { path = "../meili-snap" }
nelson = { git = "https://github.com/meilisearch/nelson.git", rev = "675f13885548fb415ead8fbb447e9e6d9314000a"} nelson = { git = "https://github.com/meilisearch/nelson.git", rev = "675f13885548fb415ead8fbb447e9e6d9314000a"}

View File

@ -11,6 +11,6 @@ edition.workspace = true
license.workspace = true license.workspace = true
[dependencies] [dependencies]
insta = { version = "^1.29.0", features = ["json", "redactions"] } insta = { version = "^1.34.0", features = ["json", "redactions"] }
md5 = "0.7.0" md5 = "0.7.0"
once_cell = "1.17" once_cell = "1.19"

View File

@ -11,16 +11,16 @@ edition.workspace = true
license.workspace = true license.workspace = true
[dependencies] [dependencies]
base64 = "0.21.0" base64 = "0.21.7"
enum-iterator = "1.4.0" enum-iterator = "1.5.0"
hmac = "0.12.1" hmac = "0.12.1"
maplit = "1.0.2" maplit = "1.0.2"
meilisearch-types = { path = "../meilisearch-types" } meilisearch-types = { path = "../meilisearch-types" }
rand = "0.8.5" rand = "0.8.5"
roaring = { version = "0.10.1", features = ["serde"] } roaring = { version = "0.10.2", features = ["serde"] }
serde = { version = "1.0.160", features = ["derive"] } serde = { version = "1.0.195", features = ["derive"] }
serde_json = { version = "1.0.95", features = ["preserve_order"] } serde_json = { version = "1.0.111", features = ["preserve_order"] }
sha2 = "0.10.6" sha2 = "0.10.8"
thiserror = "1.0.40" thiserror = "1.0.56"
time = { version = "0.3.20", features = ["serde-well-known", "formatting", "parsing", "macros"] } time = { version = "0.3.31", features = ["serde-well-known", "formatting", "parsing", "macros"] }
uuid = { version = "1.3.1", features = ["serde", "v4"] } uuid = { version = "1.6.1", features = ["serde", "v4"] }

View File

@ -11,31 +11,31 @@ edition.workspace = true
license.workspace = true license.workspace = true
[dependencies] [dependencies]
actix-web = { version = "4.3.1", default-features = false } actix-web = { version = "4.4.1", default-features = false }
anyhow = "1.0.70" anyhow = "1.0.79"
convert_case = "0.6.0" convert_case = "0.6.0"
csv = "1.2.1" csv = "1.3.0"
deserr = { version = "0.6.0", features = ["actix-web"] } deserr = { version = "0.6.1", features = ["actix-web"] }
either = { version = "1.8.1", features = ["serde"] } either = { version = "1.9.0", features = ["serde"] }
enum-iterator = "1.4.0" enum-iterator = "1.5.0"
file-store = { path = "../file-store" } file-store = { path = "../file-store" }
flate2 = "1.0.25" flate2 = "1.0.28"
fst = "0.4.7" fst = "0.4.7"
memmap2 = "0.7.1" memmap2 = "0.7.1"
milli = { path = "../milli" } milli = { path = "../milli" }
roaring = { version = "0.10.1", features = ["serde"] } roaring = { version = "0.10.2", features = ["serde"] }
serde = { version = "1.0.160", features = ["derive"] } serde = { version = "1.0.195", features = ["derive"] }
serde-cs = "0.2.4" serde-cs = "0.2.4"
serde_json = "1.0.95" serde_json = "1.0.111"
tar = "0.4.38" tar = "0.4.40"
tempfile = "3.5.0" tempfile = "3.9.0"
thiserror = "1.0.40" thiserror = "1.0.56"
time = { version = "0.3.20", features = ["serde-well-known", "formatting", "parsing", "macros"] } time = { version = "0.3.31", features = ["serde-well-known", "formatting", "parsing", "macros"] }
tokio = "1.27" tokio = "1.35"
uuid = { version = "1.3.1", features = ["serde", "v4"] } uuid = { version = "1.6.1", features = ["serde", "v4"] }
[dev-dependencies] [dev-dependencies]
insta = "1.29.0" insta = "1.34.0"
meili-snap = { path = "../meili-snap" } meili-snap = { path = "../meili-snap" }
[features] [features]

View File

@ -13,14 +13,14 @@ license.workspace = true
default-run = "meilisearch" default-run = "meilisearch"
[dependencies] [dependencies]
actix-cors = "0.6.4" actix-cors = "0.7.0"
actix-http = { version = "3.3.1", default-features = false, features = [ actix-http = { version = "3.5.1", default-features = false, features = [
"compress-brotli", "compress-brotli",
"compress-gzip", "compress-gzip",
"rustls", "rustls",
] } ] }
actix-utils = "3.0.1" actix-utils = "3.0.1"
actix-web = { version = "4.3.1", default-features = false, features = [ actix-web = { version = "4.4.1", default-features = false, features = [
"macros", "macros",
"compress-brotli", "compress-brotli",
"compress-gzip", "compress-gzip",
@ -28,109 +28,109 @@ actix-web = { version = "4.3.1", default-features = false, features = [
"rustls", "rustls",
] } ] }
actix-web-static-files = { git = "https://github.com/kilork/actix-web-static-files.git", rev = "2d3b6160", optional = true } actix-web-static-files = { git = "https://github.com/kilork/actix-web-static-files.git", rev = "2d3b6160", optional = true }
anyhow = { version = "1.0.70", features = ["backtrace"] } anyhow = { version = "1.0.79", features = ["backtrace"] }
async-stream = "0.3.5" async-stream = "0.3.5"
async-trait = "0.1.68" async-trait = "0.1.77"
bstr = "1.4.0" bstr = "1.9.0"
byte-unit = { version = "4.0.19", default-features = false, features = [ byte-unit = { version = "4.0.19", default-features = false, features = [
"std", "std",
"serde", "serde",
] } ] }
bytes = "1.4.0" bytes = "1.5.0"
clap = { version = "4.2.1", features = ["derive", "env"] } clap = { version = "4.4.17", features = ["derive", "env"] }
crossbeam-channel = "0.5.8" crossbeam-channel = "0.5.11"
deserr = { version = "0.6.0", features = ["actix-web"] } deserr = { version = "0.6.1", features = ["actix-web"] }
dump = { path = "../dump" } dump = { path = "../dump" }
either = "1.8.1" either = "1.9.0"
env_logger = "0.10.0" env_logger = "0.10.1"
file-store = { path = "../file-store" } file-store = { path = "../file-store" }
flate2 = "1.0.25" flate2 = "1.0.28"
fst = "0.4.7" fst = "0.4.7"
futures = "0.3.28" futures = "0.3.30"
futures-util = "0.3.28" futures-util = "0.3.30"
http = "0.2.9" http = "0.2.11"
index-scheduler = { path = "../index-scheduler" } index-scheduler = { path = "../index-scheduler" }
indexmap = { version = "2.0.0", features = ["serde"] } indexmap = { version = "2.1.0", features = ["serde"] }
is-terminal = "0.4.8" is-terminal = "0.4.10"
itertools = "0.11.0" itertools = "0.11.0"
jsonwebtoken = "8.3.0" jsonwebtoken = "8.3.0"
lazy_static = "1.4.0" lazy_static = "1.4.0"
log = "0.4.17" log = "0.4.20"
meilisearch-auth = { path = "../meilisearch-auth" } meilisearch-auth = { path = "../meilisearch-auth" }
meilisearch-types = { path = "../meilisearch-types" } meilisearch-types = { path = "../meilisearch-types" }
mimalloc = { version = "0.1.37", default-features = false } mimalloc = { version = "0.1.39", default-features = false }
mime = "0.3.17" mime = "0.3.17"
num_cpus = "1.15.0" num_cpus = "1.16.0"
obkv = "0.2.0" obkv = "0.2.1"
once_cell = "1.17.1" once_cell = "1.19.0"
ordered-float = "3.7.0" ordered-float = "4.2.0"
parking_lot = "0.12.1" parking_lot = "0.12.1"
permissive-json-pointer = { path = "../permissive-json-pointer" } permissive-json-pointer = { path = "../permissive-json-pointer" }
pin-project-lite = "0.2.9" pin-project-lite = "0.2.13"
platform-dirs = "0.3.0" platform-dirs = "0.3.0"
prometheus = { version = "0.13.3", features = ["process"] } prometheus = { version = "0.13.3", features = ["process"] }
puffin = { version = "0.16.0", features = ["serialization"] } puffin = { version = "0.16.0", features = ["serialization"] }
rand = "0.8.5" rand = "0.8.5"
rayon = "1.7.0" rayon = "1.8.0"
regex = "1.7.3" regex = "1.10.2"
reqwest = { version = "0.11.16", features = [ reqwest = { version = "0.11.23", features = [
"rustls-tls", "rustls-tls",
"json", "json",
], default-features = false } ], default-features = false }
rustls = "0.20.8" rustls = "0.20.8"
rustls-pemfile = "1.0.2" rustls-pemfile = "1.0.2"
segment = { version = "0.2.2", optional = true } segment = { version = "0.2.3", optional = true }
serde = { version = "1.0.160", features = ["derive"] } serde = { version = "1.0.195", features = ["derive"] }
serde_json = { version = "1.0.95", features = ["preserve_order"] } serde_json = { version = "1.0.111", features = ["preserve_order"] }
sha2 = "0.10.6" sha2 = "0.10.8"
siphasher = "0.3.10" siphasher = "1.0.0"
slice-group-by = "0.3.0" slice-group-by = "0.3.1"
static-files = { version = "0.2.3", optional = true } static-files = { version = "0.2.3", optional = true }
sysinfo = "0.29.7" sysinfo = "0.30.5"
tar = "0.4.38" tar = "0.4.40"
tempfile = "3.5.0" tempfile = "3.9.0"
thiserror = "1.0.40" thiserror = "1.0.56"
time = { version = "0.3.20", features = [ time = { version = "0.3.31", features = [
"serde-well-known", "serde-well-known",
"formatting", "formatting",
"parsing", "parsing",
"macros", "macros",
] } ] }
tokio = { version = "1.27.0", features = ["full"] } tokio = { version = "1.35.1", features = ["full"] }
tokio-stream = "0.1.12" tokio-stream = "0.1.14"
toml = "0.7.3" toml = "0.8.8"
uuid = { version = "1.3.1", features = ["serde", "v4"] } uuid = { version = "1.6.1", features = ["serde", "v4"] }
walkdir = "2.3.3" walkdir = "2.4.0"
yaup = "0.2.1" yaup = "0.2.1"
serde_urlencoded = "0.7.1" serde_urlencoded = "0.7.1"
termcolor = "1.2.0" termcolor = "1.4.1"
url = { version = "2.5.0", features = ["serde"] } url = { version = "2.5.0", features = ["serde"] }
[dev-dependencies] [dev-dependencies]
actix-rt = "2.8.0" actix-rt = "2.9.0"
assert-json-diff = "2.0.2" assert-json-diff = "2.0.2"
brotli = "3.3.4" brotli = "3.4.0"
insta = "1.29.0" insta = "1.34.0"
manifest-dir-macros = "0.1.16" manifest-dir-macros = "0.1.18"
maplit = "1.0.2" maplit = "1.0.2"
meili-snap = { path = "../meili-snap" } meili-snap = { path = "../meili-snap" }
temp-env = "0.3.3" temp-env = "0.3.6"
urlencoding = "2.1.2" urlencoding = "2.1.3"
yaup = "0.2.1" yaup = "0.2.1"
[build-dependencies] [build-dependencies]
anyhow = { version = "1.0.70", optional = true } anyhow = { version = "1.0.79", optional = true }
cargo_toml = { version = "0.15.2", optional = true } cargo_toml = { version = "0.18.0", optional = true }
hex = { version = "0.4.3", optional = true } hex = { version = "0.4.3", optional = true }
reqwest = { version = "0.11.16", features = [ reqwest = { version = "0.11.23", features = [
"blocking", "blocking",
"rustls-tls", "rustls-tls",
], default-features = false, optional = true } ], default-features = false, optional = true }
sha-1 = { version = "0.10.1", optional = true } sha-1 = { version = "0.10.1", optional = true }
static-files = { version = "0.2.3", optional = true } static-files = { version = "0.2.3", optional = true }
tempfile = { version = "3.5.0", optional = true } tempfile = { version = "3.9.0", optional = true }
vergen = { version = "7.5.1", default-features = false, features = ["git"] } vergen = { version = "7.5.1", default-features = false, features = ["git"] }
zip = { version = "0.6.4", optional = true } zip = { version = "0.6.6", optional = true }
[features] [features]
default = ["analytics", "meilisearch-types/all-tokenizations", "mini-dashboard"] default = ["analytics", "meilisearch-types/all-tokenizations", "mini-dashboard"]

View File

@ -18,7 +18,7 @@ use segment::message::{Identify, Track, User};
use segment::{AutoBatcher, Batcher, HttpClient}; use segment::{AutoBatcher, Batcher, HttpClient};
use serde::Serialize; use serde::Serialize;
use serde_json::{json, Value}; use serde_json::{json, Value};
use sysinfo::{DiskExt, System, SystemExt}; use sysinfo::{Disks, System};
use time::OffsetDateTime; use time::OffsetDateTime;
use tokio::select; use tokio::select;
use tokio::sync::mpsc::{self, Receiver, Sender}; use tokio::sync::mpsc::{self, Receiver, Sender};
@ -386,16 +386,17 @@ impl Segment {
fn compute_traits(opt: &Opt, stats: Stats) -> Value { fn compute_traits(opt: &Opt, stats: Stats) -> Value {
static FIRST_START_TIMESTAMP: Lazy<Instant> = Lazy::new(Instant::now); static FIRST_START_TIMESTAMP: Lazy<Instant> = Lazy::new(Instant::now);
static SYSTEM: Lazy<Value> = Lazy::new(|| { static SYSTEM: Lazy<Value> = Lazy::new(|| {
let disks = Disks::new_with_refreshed_list();
let mut sys = System::new_all(); let mut sys = System::new_all();
sys.refresh_all(); sys.refresh_all();
let kernel_version = let kernel_version = System::kernel_version()
sys.kernel_version().and_then(|k| k.split_once('-').map(|(k, _)| k.to_string())); .and_then(|k| k.split_once('-').map(|(k, _)| k.to_string()));
json!({ json!({
"distribution": sys.name(), "distribution": System::name(),
"kernel_version": kernel_version, "kernel_version": kernel_version,
"cores": sys.cpus().len(), "cores": sys.cpus().len(),
"ram_size": sys.total_memory(), "ram_size": sys.total_memory(),
"disk_size": sys.disks().iter().map(|disk| disk.total_space()).max(), "disk_size": disks.iter().map(|disk| disk.total_space()).max(),
"server_provider": std::env::var("MEILI_SERVER_PROVIDER").ok(), "server_provider": std::env::var("MEILI_SERVER_PROVIDER").ok(),
}) })
}); });

View File

@ -20,7 +20,7 @@ use rustls::server::{
use rustls::RootCertStore; use rustls::RootCertStore;
use rustls_pemfile::{certs, pkcs8_private_keys, rsa_private_keys}; use rustls_pemfile::{certs, pkcs8_private_keys, rsa_private_keys};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use sysinfo::{RefreshKind, System, SystemExt}; use sysinfo::{MemoryRefreshKind, RefreshKind, System};
use url::Url; use url::Url;
const POSSIBLE_ENV: [&str; 2] = ["development", "production"]; const POSSIBLE_ENV: [&str; 2] = ["development", "production"];
@ -633,8 +633,8 @@ impl MaxMemory {
/// Returns the total amount of bytes available or `None` if this system isn't supported. /// Returns the total amount of bytes available or `None` if this system isn't supported.
fn total_memory_bytes() -> Option<u64> { fn total_memory_bytes() -> Option<u64> {
if System::IS_SUPPORTED { if sysinfo::IS_SUPPORTED_SYSTEM {
let memory_kind = RefreshKind::new().with_memory(); let memory_kind = RefreshKind::new().with_memory(MemoryRefreshKind::new().with_ram());
let mut system = System::new_with_specifics(memory_kind); let mut system = System::new_with_specifics(memory_kind);
system.refresh_memory(); system.refresh_memory();
Some(system.total_memory()) Some(system.total_memory())

View File

@ -9,11 +9,11 @@ edition.workspace = true
license.workspace = true license.workspace = true
[dependencies] [dependencies]
anyhow = "1.0.75" anyhow = "1.0.79"
clap = { version = "4.2.1", features = ["derive"] } clap = { version = "4.4.17", features = ["derive"] }
dump = { path = "../dump" } dump = { path = "../dump" }
file-store = { path = "../file-store" } file-store = { path = "../file-store" }
meilisearch-auth = { path = "../meilisearch-auth" } meilisearch-auth = { path = "../meilisearch-auth" }
meilisearch-types = { path = "../meilisearch-types" } meilisearch-types = { path = "../meilisearch-types" }
time = { version = "0.3.30", features = ["formatting"] } time = { version = "0.3.31", features = ["formatting"] }
uuid = { version = "1.5.0", features = ["v4"], default-features = false } uuid = { version = "1.6.1", features = ["v4"], default-features = false }

View File

@ -14,14 +14,14 @@ license.workspace = true
[dependencies] [dependencies]
bimap = { version = "0.6.3", features = ["serde"] } bimap = { version = "0.6.3", features = ["serde"] }
bincode = "1.3.3" bincode = "1.3.3"
bstr = "1.4.0" bstr = "1.9.0"
bytemuck = { version = "1.13.1", features = ["extern_crate_alloc"] } bytemuck = { version = "1.14.0", features = ["extern_crate_alloc"] }
byteorder = "1.4.3" byteorder = "1.5.0"
charabia = { version = "0.8.5", default-features = false } charabia = { version = "0.8.5", default-features = false }
concat-arrays = "0.1.2" concat-arrays = "0.1.2"
crossbeam-channel = "0.5.8" crossbeam-channel = "0.5.11"
deserr = "0.6.0" deserr = "0.6.1"
either = { version = "1.8.1", features = ["serde"] } either = { version = "1.9.0", features = ["serde"] }
flatten-serde-json = { path = "../flatten-serde-json" } flatten-serde-json = { path = "../flatten-serde-json" }
fst = "0.4.7" fst = "0.4.7"
fxhash = "0.2.1" fxhash = "0.2.1"
@ -35,32 +35,32 @@ heed = { version = "0.20.0-alpha.9", default-features = false, features = [
"serde-bincode", "serde-bincode",
"read-txn-no-tls", "read-txn-no-tls",
] } ] }
indexmap = { version = "2.0.0", features = ["serde"] } indexmap = { version = "2.1.0", features = ["serde"] }
json-depth-checker = { path = "../json-depth-checker" } json-depth-checker = { path = "../json-depth-checker" }
levenshtein_automata = { version = "0.2.1", features = ["fst_automaton"] } levenshtein_automata = { version = "0.2.1", features = ["fst_automaton"] }
memmap2 = "0.7.1" memmap2 = "0.7.1"
obkv = "0.2.0" obkv = "0.2.1"
once_cell = "1.17.1" once_cell = "1.19.0"
ordered-float = "3.6.0" ordered-float = "4.2.0"
rand_pcg = { version = "0.3.1", features = ["serde1"] } rand_pcg = { version = "0.3.1", features = ["serde1"] }
rayon = "1.7.0" rayon = "1.8.0"
roaring = "0.10.1" roaring = "0.10.2"
rstar = { version = "0.11.0", features = ["serde"] } rstar = { version = "0.11.0", features = ["serde"] }
serde = { version = "1.0.160", features = ["derive"] } serde = { version = "1.0.195", features = ["derive"] }
serde_json = { version = "1.0.95", features = ["preserve_order"] } serde_json = { version = "1.0.111", features = ["preserve_order"] }
slice-group-by = "0.3.0" slice-group-by = "0.3.1"
smallstr = { version = "0.3.0", features = ["serde"] } smallstr = { version = "0.3.0", features = ["serde"] }
smallvec = "1.10.0" smallvec = "1.12.0"
smartstring = "1.0.1" smartstring = "1.0.1"
tempfile = "3.5.0" tempfile = "3.9.0"
thiserror = "1.0.40" thiserror = "1.0.56"
time = { version = "0.3.20", features = [ time = { version = "0.3.31", features = [
"serde-well-known", "serde-well-known",
"formatting", "formatting",
"parsing", "parsing",
"macros", "macros",
] } ] }
uuid = { version = "1.3.1", features = ["v4"] } uuid = { version = "1.6.1", features = ["v4"] }
filter-parser = { path = "../filter-parser" } filter-parser = { path = "../filter-parser" }
@ -71,9 +71,9 @@ itertools = "0.11.0"
puffin = "0.16.0" puffin = "0.16.0"
# logging # logging
log = "0.4.17" log = "0.4.20"
logging_timer = "1.1.0" logging_timer = "1.1.0"
csv = "1.2.1" csv = "1.3.0"
candle-core = { git = "https://github.com/huggingface/candle.git", version = "0.3.1" } candle-core = { git = "https://github.com/huggingface/candle.git", version = "0.3.1" }
candle-transformers = { git = "https://github.com/huggingface/candle.git", version = "0.3.1" } candle-transformers = { git = "https://github.com/huggingface/candle.git", version = "0.3.1" }
candle-nn = { git = "https://github.com/huggingface/candle.git", version = "0.3.1" } candle-nn = { git = "https://github.com/huggingface/candle.git", version = "0.3.1" }
@ -81,21 +81,21 @@ tokenizers = { git = "https://github.com/huggingface/tokenizers.git", tag = "v0.
hf-hub = { git = "https://github.com/dureuill/hf-hub.git", branch = "rust_tls", default_features = false, features = [ hf-hub = { git = "https://github.com/dureuill/hf-hub.git", branch = "rust_tls", default_features = false, features = [
"online", "online",
] } ] }
tokio = { version = "1.34.0", features = ["rt"] } tokio = { version = "1.35.1", features = ["rt"] }
futures = "0.3.29" futures = "0.3.30"
reqwest = { version = "0.11.16", features = [ reqwest = { version = "0.11.23", features = [
"rustls-tls", "rustls-tls",
"json", "json",
], default-features = false } ], default-features = false }
tiktoken-rs = "0.5.7" tiktoken-rs = "0.5.8"
liquid = "0.26.4" liquid = "0.26.4"
arroy = { git = "https://github.com/meilisearch/arroy.git", version = "0.1.0" } arroy = "0.2.0"
rand = "0.8.5" rand = "0.8.5"
[dev-dependencies] [dev-dependencies]
mimalloc = { version = "0.1.37", default-features = false } mimalloc = { version = "0.1.39", default-features = false }
big_s = "1.0.2" big_s = "1.0.2"
insta = "1.29.0" insta = "1.34.0"
maplit = "1.0.2" maplit = "1.0.2"
md5 = "0.7.0" md5 = "0.7.0"
meili-snap = { path = "../meili-snap" } meili-snap = { path = "../meili-snap" }

View File

@ -172,7 +172,7 @@ only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and undersco
TooManyDocumentIds { primary_key: String, document: Object }, TooManyDocumentIds { primary_key: String, document: Object },
#[error("The primary key inference failed as the engine did not find any field ending with `id` in its name. Please specify the primary key manually using the `primaryKey` query parameter.")] #[error("The primary key inference failed as the engine did not find any field ending with `id` in its name. Please specify the primary key manually using the `primaryKey` query parameter.")]
NoPrimaryKeyCandidateFound, NoPrimaryKeyCandidateFound,
#[error("The primary key inference failed as the engine found {} fields ending with `id` in their names: '{}' and '{}'. Please specify the primary key manually using the `primaryKey` query parameter.", .candidates.len(), .candidates.get(0).unwrap(), .candidates.get(1).unwrap())] #[error("The primary key inference failed as the engine found {} fields ending with `id` in their names: '{}' and '{}'. Please specify the primary key manually using the `primaryKey` query parameter.", .candidates.len(), .candidates.first().unwrap(), .candidates.get(1).unwrap())]
MultiplePrimaryKeyCandidatesFound { candidates: Vec<String> }, MultiplePrimaryKeyCandidatesFound { candidates: Vec<String> },
#[error("There is no more space left on the device. Consider increasing the size of the disk/partition.")] #[error("There is no more space left on the device. Consider increasing the size of the disk/partition.")]
NoSpaceLeftOnDevice, NoSpaceLeftOnDevice,
@ -251,6 +251,7 @@ impl From<arroy::Error> for Error {
arroy::Error::DatabaseFull arroy::Error::DatabaseFull
| arroy::Error::InvalidItemAppend | arroy::Error::InvalidItemAppend
| arroy::Error::UnmatchingDistance { .. } | arroy::Error::UnmatchingDistance { .. }
| arroy::Error::MissingNode
| arroy::Error::MissingMetadata => { | arroy::Error::MissingMetadata => {
Error::InternalError(InternalError::ArroyError(value)) Error::InternalError(InternalError::ArroyError(value))
} }

View File

@ -181,7 +181,7 @@ mod tests {
get_simple_string_index_with_multiple_field_ids(), get_simple_string_index_with_multiple_field_ids(),
get_random_looking_string_index_with_multiple_field_ids(), get_random_looking_string_index_with_multiple_field_ids(),
]; ];
for (_i, index) in indexes.iter().enumerate() { for index in indexes {
let txn = index.env.read_txn().unwrap(); let txn = index.env.read_txn().unwrap();
let candidates = RoaringBitmap::new(); let candidates = RoaringBitmap::new();
let mut results = String::new(); let mut results = String::new();
@ -212,7 +212,7 @@ mod tests {
get_simple_string_index_with_multiple_field_ids(), get_simple_string_index_with_multiple_field_ids(),
get_random_looking_string_index_with_multiple_field_ids(), get_random_looking_string_index_with_multiple_field_ids(),
]; ];
for (_i, index) in indexes.iter().enumerate() { for index in indexes {
let txn = index.env.read_txn().unwrap(); let txn = index.env.read_txn().unwrap();
let candidates = RoaringBitmap::new(); let candidates = RoaringBitmap::new();
let mut results = String::new(); let mut results = String::new();

View File

@ -195,7 +195,7 @@ mod tests {
get_simple_string_index_with_multiple_field_ids(), get_simple_string_index_with_multiple_field_ids(),
get_random_looking_string_index_with_multiple_field_ids(), get_random_looking_string_index_with_multiple_field_ids(),
]; ];
for (_i, index) in indexes.iter().enumerate() { for index in indexes {
let txn = index.env.read_txn().unwrap(); let txn = index.env.read_txn().unwrap();
let candidates = RoaringBitmap::new(); let candidates = RoaringBitmap::new();
let mut results = String::new(); let mut results = String::new();
@ -226,7 +226,7 @@ mod tests {
get_simple_string_index_with_multiple_field_ids(), get_simple_string_index_with_multiple_field_ids(),
get_random_looking_string_index_with_multiple_field_ids(), get_random_looking_string_index_with_multiple_field_ids(),
]; ];
for (_i, index) in indexes.iter().enumerate() { for index in indexes {
let txn = index.env.read_txn().unwrap(); let txn = index.env.read_txn().unwrap();
let candidates = RoaringBitmap::new(); let candidates = RoaringBitmap::new();
let mut results = String::new(); let mut results = String::new();

View File

@ -142,7 +142,7 @@ pub(crate) mod tests {
let mut txn = index.env.write_txn().unwrap(); let mut txn = index.env.write_txn().unwrap();
let mut rng = rand::rngs::SmallRng::from_seed([0; 32]); let mut rng = rand::rngs::SmallRng::from_seed([0; 32]);
for (_i, key) in std::iter::from_fn(|| Some(rng.gen_range(0..256))).take(128).enumerate() { for key in std::iter::from_fn(|| Some(rng.gen_range(0..256))).take(128) {
let mut bitmap = RoaringBitmap::new(); let mut bitmap = RoaringBitmap::new();
bitmap.insert(key); bitmap.insert(key);
bitmap.insert(key + 100); bitmap.insert(key + 100);
@ -172,7 +172,7 @@ pub(crate) mod tests {
let keys = let keys =
std::iter::from_fn(|| Some(rng.gen_range(0..256))).take(128).collect::<Vec<u32>>(); std::iter::from_fn(|| Some(rng.gen_range(0..256))).take(128).collect::<Vec<u32>>();
for fid in 0..2 { for fid in 0..2 {
for (_i, &key) in keys.iter().enumerate() { for &key in &keys {
let mut bitmap = RoaringBitmap::new(); let mut bitmap = RoaringBitmap::new();
bitmap.insert(key); bitmap.insert(key);
bitmap.insert(key + 100); bitmap.insert(key + 100);
@ -207,7 +207,7 @@ pub(crate) mod tests {
let keys = let keys =
std::iter::from_fn(|| Some(rng.gen_range(0..256))).take(128).collect::<Vec<u32>>(); std::iter::from_fn(|| Some(rng.gen_range(0..256))).take(128).collect::<Vec<u32>>();
for fid in 0..2 { for fid in 0..2 {
for (_i, &key) in keys.iter().enumerate() { for &key in &keys {
let mut bitmap = RoaringBitmap::new(); let mut bitmap = RoaringBitmap::new();
bitmap.insert(key); bitmap.insert(key);
bitmap.insert(key + 100); bitmap.insert(key + 100);

View File

@ -751,7 +751,7 @@ mod tests {
let mut rng = rand::rngs::SmallRng::from_seed([0; 32]); let mut rng = rand::rngs::SmallRng::from_seed([0; 32]);
keys.shuffle(&mut rng); keys.shuffle(&mut rng);
for (_i, key) in keys.into_iter().enumerate() { for key in keys {
let mut bitmap = RoaringBitmap::new(); let mut bitmap = RoaringBitmap::new();
bitmap.insert(key); bitmap.insert(key);
index.insert(&mut txn, 0, &(key as f64), &bitmap); index.insert(&mut txn, 0, &(key as f64), &bitmap);
@ -770,7 +770,7 @@ mod tests {
let mut rng = rand::rngs::SmallRng::from_seed([0; 32]); let mut rng = rand::rngs::SmallRng::from_seed([0; 32]);
keys.shuffle(&mut rng); keys.shuffle(&mut rng);
for (_i, key) in keys.into_iter().enumerate() { for key in keys {
let mut bitmap = RoaringBitmap::new(); let mut bitmap = RoaringBitmap::new();
bitmap.insert(key); bitmap.insert(key);
bitmap.insert(rng.gen_range(256..512)); bitmap.insert(rng.gen_range(256..512));

View File

@ -135,7 +135,7 @@ pub fn extract_vector_points<R: io::Read + io::Seek>(
let del_vectors = extract_vectors(old, document_id, embedder_name)?; let del_vectors = extract_vectors(old, document_id, embedder_name)?;
let add_vectors = extract_vectors(new, document_id, embedder_name)?; let add_vectors = extract_vectors(new, document_id, embedder_name)?;
if add_vectors.len() > u8::MAX.into() { if add_vectors.len() > usize::from(u8::MAX) {
return Err(crate::Error::UserError(crate::UserError::TooManyVectors( return Err(crate::Error::UserError(crate::UserError::TooManyVectors(
document_id().to_string(), document_id().to_string(),
add_vectors.len(), add_vectors.len(),
@ -164,7 +164,7 @@ pub fn extract_vector_points<R: io::Read + io::Seek>(
(None, Some(new)) => { (None, Some(new)) => {
// was possibly autogenerated, remove all vectors for that document // was possibly autogenerated, remove all vectors for that document
let add_vectors = extract_vectors(new, document_id, embedder_name)?; let add_vectors = extract_vectors(new, document_id, embedder_name)?;
if add_vectors.len() > u8::MAX.into() { if add_vectors.len() > usize::from(u8::MAX) {
return Err(crate::Error::UserError(crate::UserError::TooManyVectors( return Err(crate::Error::UserError(crate::UserError::TooManyVectors(
document_id().to_string(), document_id().to_string(),
add_vectors.len(), add_vectors.len(),

View File

@ -77,7 +77,7 @@ pub fn extract_word_pair_proximity_docids<R: io::Read + io::Seek>(
if let Some(deletion) = KvReaderDelAdd::new(value).get(DelAdd::Deletion) { if let Some(deletion) = KvReaderDelAdd::new(value).get(DelAdd::Deletion) {
for (position, word) in KvReaderU16::new(deletion).iter() { for (position, word) in KvReaderU16::new(deletion).iter() {
// drain the proximity window until the head word is considered close to the word we are inserting. // drain the proximity window until the head word is considered close to the word we are inserting.
while del_word_positions.get(0).map_or(false, |(_w, p)| { while del_word_positions.front().map_or(false, |(_w, p)| {
index_proximity(*p as u32, position as u32) >= MAX_DISTANCE index_proximity(*p as u32, position as u32) >= MAX_DISTANCE
}) { }) {
word_positions_into_word_pair_proximity( word_positions_into_word_pair_proximity(
@ -106,7 +106,7 @@ pub fn extract_word_pair_proximity_docids<R: io::Read + io::Seek>(
if let Some(addition) = KvReaderDelAdd::new(value).get(DelAdd::Addition) { if let Some(addition) = KvReaderDelAdd::new(value).get(DelAdd::Addition) {
for (position, word) in KvReaderU16::new(addition).iter() { for (position, word) in KvReaderU16::new(addition).iter() {
// drain the proximity window until the head word is considered close to the word we are inserting. // drain the proximity window until the head word is considered close to the word we are inserting.
while add_word_positions.get(0).map_or(false, |(_w, p)| { while add_word_positions.front().map_or(false, |(_w, p)| {
index_proximity(*p as u32, position as u32) >= MAX_DISTANCE index_proximity(*p as u32, position as u32) >= MAX_DISTANCE
}) { }) {
word_positions_into_word_pair_proximity( word_positions_into_word_pair_proximity(

View File

@ -522,12 +522,8 @@ where
pool.install(|| { pool.install(|| {
let writer_index = (embedder_index as u16) << 8; let writer_index = (embedder_index as u16) << 8;
for k in 0..=u8::MAX { for k in 0..=u8::MAX {
let writer = arroy::Writer::prepare( let writer =
wtxn, arroy::Writer::new(vector_arroy, writer_index | (k as u16), dimension)?;
vector_arroy,
writer_index | (k as u16),
dimension,
)?;
if writer.is_empty(wtxn)? { if writer.is_empty(wtxn)? {
break; break;
} }

View File

@ -372,8 +372,7 @@ pub(crate) fn write_typed_chunk_into_index(
// FIXME: allow customizing distance // FIXME: allow customizing distance
let writers: std::result::Result<Vec<_>, _> = (0..=u8::MAX) let writers: std::result::Result<Vec<_>, _> = (0..=u8::MAX)
.map(|k| { .map(|k| {
arroy::Writer::prepare( arroy::Writer::new(
wtxn,
index.vector_arroy, index.vector_arroy,
writer_index | (k as u16), writer_index | (k as u16),
expected_dimension, expected_dimension,
@ -407,7 +406,7 @@ pub(crate) fn write_typed_chunk_into_index(
// code error if we somehow got the wrong dimension // code error if we somehow got the wrong dimension
.unwrap(); .unwrap();
if embeddings.embedding_count() > u8::MAX.into() { if embeddings.embedding_count() > usize::from(u8::MAX) {
let external_docid = if let Ok(Some(Ok(index))) = index let external_docid = if let Ok(Some(Ok(index))) = index
.external_id_of(wtxn, std::iter::once(docid)) .external_id_of(wtxn, std::iter::once(docid))
.map(|it| it.into_iter().next()) .map(|it| it.into_iter().next())