From fc6154ffa09989958413e516f73257548dc70652 Mon Sep 17 00:00:00 2001 From: Arnaud Gourlay Date: Thu, 29 Aug 2024 17:00:36 +0200 Subject: [PATCH] use latest qdrant-client with builders --- Cargo.lock | 954 ++++++++---------- Cargo.toml | 2 +- Dockerfile | 2 +- README.md | 2 +- src/common/client.rs | 434 ++++---- src/common/coach_errors.rs | 6 + src/common/generators.rs | 2 +- src/common/mod.rs | 1 - src/drill_runner.rs | 16 +- src/drills/collection_concurrent_lifecycle.rs | 6 +- src/drills/collection_snapshots_churn.rs | 8 +- src/drills/collections_churn.rs | 6 +- src/drills/high_concurrency.rs | 18 +- src/drills/large_retrieve.rs | 6 +- src/drills/points_churn.rs | 6 +- src/drills/points_optional_vectors.rs | 10 +- src/drills/points_search.rs | 6 +- src/drills/points_upsert.rs | 8 +- src/drills/toggle_indexing.rs | 6 +- src/healthcheck.rs | 6 +- src/main.rs | 6 +- 21 files changed, 634 insertions(+), 877 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a09291f..e1ef309 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aho-corasick" version = "1.1.3" @@ -28,9 +34,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -49,27 +55,27 @@ checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -128,18 +134,17 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.29", + "http", + "http-body", + "http-body-util", "itoa", "matchit", "memchr", @@ -148,7 +153,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper", + "sync_wrapper 1.0.1", "tower", "tower-layer", "tower-service", @@ -156,17 +161,20 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", + "http", + "http-body", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 0.1.2", "tower-layer", "tower-service", ] @@ -181,7 +189,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -200,15 +208,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bumpalo" @@ -224,15 +226,18 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cc" -version = "1.0.99" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -282,9 +287,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "coach" @@ -306,9 +311,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "core-foundation" @@ -322,9 +327,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "crc32fast" @@ -361,27 +366,82 @@ dependencies = [ ] [[package]] -name = "displaydoc" -version = "0.2.4" +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ + "fnv", + "ident_case", "proc-macro2", "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "derive_builder" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +dependencies = [ + "derive_builder_core", "syn", ] [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "env_filter" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ "log", "regex", @@ -408,12 +468,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -539,36 +599,17 @@ checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.2.6", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.1.0", - "indexmap 2.2.6", + "http", + "indexmap 2.4.0", "slab", "tokio", "tokio-util", @@ -613,17 +654,6 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.1.0" @@ -637,23 +667,12 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - -[[package]] -name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.1.0", + "http", ] [[package]] @@ -664,16 +683,16 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.0", + "http", + "http-body", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.9.3" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0e7a4dd27b9476dc40cb050d3632d3bba3a70ddbff012285f7f8559a1e7e545" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -689,43 +708,20 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.29" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", + "h2", + "http", + "http-body", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.0", - "httparse", - "itoa", - "pin-project-lite", "smallvec", "tokio", "want", @@ -733,45 +729,47 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.26.0" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" dependencies = [ "futures-util", - "http 1.1.0", - "hyper 1.3.1", + "http", + "hyper", "hyper-util", "rustls", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", + "webpki-roots", ] [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "hyper 0.14.29", + "hyper", + "hyper-util", "pin-project-lite", "tokio", - "tokio-io-timeout", + "tower-service", ] [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "hyper 1.3.1", + "http", + "http-body", + "hyper", "pin-project-lite", "socket2", "tokio", @@ -781,133 +779,19 @@ dependencies = [ ] [[package]] -name = "icu_collections" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - -[[package]] -name = "icu_normalizer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" - -[[package]] -name = "icu_properties" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" - -[[package]] -name = "icu_provider" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_provider_macros" -version = "1.5.0" +name = "ident_case" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "1.0.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "icu_normalizer", - "icu_properties", - "smallvec", - "utf8_iter", + "unicode-bidi", + "unicode-normalization", ] [[package]] @@ -922,9 +806,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -938,15 +822,15 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -959,24 +843,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "litemap" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "lock_api" @@ -1020,18 +898,27 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi", "libc", @@ -1045,7 +932,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.5.0", + "bitflags", "cfg-if", "cfg_aliases", "libc", @@ -1072,9 +959,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.0" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -1111,7 +998,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -1154,24 +1041,27 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "prost" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" dependencies = [ "bytes", "prost-derive", @@ -1179,9 +1069,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" dependencies = [ "anyhow", "itertools", @@ -1192,34 +1082,84 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" dependencies = [ "prost", ] [[package]] name = "qdrant-client" -version = "1.9.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f99a77fdc9b1ef9ce9ab9edcdd3e56e6977475faf633598f1a37066c87be4b7" +checksum = "0ad523a9b4633360e81fbb9affb54ee42ca09a873130e173d90c1cf5dc2e158a" dependencies = [ "anyhow", + "derive_builder", "futures-util", "prost", "prost-types", "reqwest", "serde", "serde_json", + "thiserror", "tonic", ] +[[package]] +name = "quinn" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" +dependencies = [ + "bytes", + "rand", + "ring", + "rustc-hash", + "rustls", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +dependencies = [ + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1256,18 +1196,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.5.0", + "bitflags", ] [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -1294,19 +1234,19 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.12.4" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64 0.22.1", "bytes", "futures-core", "futures-util", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.0", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.3.1", + "hyper", "hyper-rustls", "hyper-util", "ipnet", @@ -1316,13 +1256,14 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "quinn", "rustls", "rustls-pemfile", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 1.0.1", "tokio", "tokio-rustls", "tokio-util", @@ -1333,7 +1274,7 @@ dependencies = [ "wasm-streams", "web-sys", "webpki-roots", - "winreg", + "windows-registry", ] [[package]] @@ -1357,13 +1298,20 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "log", + "once_cell", "ring", "rustls-pki-types", "rustls-webpki", @@ -1373,9 +1321,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +checksum = "04182dffc9091a404e0fc069ea5cd60e5b866c3adf881eff99a32d048242dffa" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -1386,9 +1334,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ "base64 0.22.1", "rustls-pki-types", @@ -1396,15 +1344,15 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" dependencies = [ "ring", "rustls-pki-types", @@ -1440,11 +1388,11 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.5.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -1453,9 +1401,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -1463,18 +1411,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.203" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", @@ -1483,11 +1431,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -1504,6 +1453,12 @@ dependencies = [ "serde", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -1544,12 +1499,6 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "strsim" version = "0.11.1" @@ -1558,15 +1507,15 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.66" +version = "2.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" dependencies = [ "proc-macro2", "quote", @@ -1580,14 +1529,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "synstructure" -version = "0.13.1" +name = "sync_wrapper" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" dependencies = [ - "proc-macro2", - "quote", - "syn", + "futures-core", ] [[package]] @@ -1611,15 +1558,20 @@ dependencies = [ ] [[package]] -name = "tinystr" -version = "0.7.6" +name = "tinyvec" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ - "displaydoc", - "zerovec", + "tinyvec_macros", ] +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "tokio" version = "1.39.3" @@ -1638,16 +1590,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.4.0" @@ -1661,9 +1603,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ "rustls", "rustls-pki-types", @@ -1696,27 +1638,29 @@ dependencies = [ [[package]] name = "tonic" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64 0.22.1", "bytes", "flate2", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.29", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", "prost", "rustls-native-certs", "rustls-pemfile", - "rustls-pki-types", + "socket2", "tokio", "tokio-rustls", "tokio-stream", @@ -1748,15 +1692,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -1795,12 +1739,27 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + [[package]] name = "untrusted" version = "0.9.0" @@ -1809,27 +1768,15 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.1" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - [[package]] name = "utf8parse" version = "0.2.2" @@ -1853,19 +1800,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", @@ -1878,9 +1826,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -1890,9 +1838,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1900,9 +1848,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", @@ -1913,9 +1861,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-streams" @@ -1932,9 +1880,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -1942,53 +1890,59 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c452ad30530b54a4d8e71952716a212b08efd0f3562baa66c29a618b07da7c3" +checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" dependencies = [ "rustls-pki-types", ] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-registry" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows-targets 0.48.5", + "windows-result", + "windows-strings", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.52.0" +name = "windows-result" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-targets 0.52.6", + "windows-result", + "windows-targets", ] [[package]] name = "windows-sys" -version = "0.59.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -1997,46 +1951,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2049,48 +1985,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -2098,70 +2010,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - -[[package]] -name = "writeable" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" - -[[package]] -name = "yoke" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerofrom" -version = "0.1.4" +name = "zerocopy" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "zerofrom-derive", + "byteorder", + "zerocopy-derive", ] [[package]] -name = "zerofrom-derive" -version = "0.1.4" +name = "zerocopy-derive" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", "syn", - "synstructure", ] [[package]] @@ -2169,25 +2035,3 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" - -[[package]] -name = "zerovec" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/Cargo.toml b/Cargo.toml index 87f84f1..d2338e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ clap = { version = "4.5.16", features = ["derive"] } ctrlc = "3.4.5" futures = "0.3.30" async-trait = "0.1.81" -qdrant-client = "1.9.0" +qdrant-client = "1.11.2" rand = "0.8.5" tokio = { version = "1.39.3", features = ["full"] } log = "0.4.22" diff --git a/Dockerfile b/Dockerfile index 94dccc2..53af881 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Leveraging the pre-built Docker images with # cargo-chef and the Rust toolchain # https://www.lpalmieri.com/posts/fast-rust-docker-builds/ -FROM --platform=${BUILDPLATFORM:-linux/amd64} lukemathwalker/cargo-chef:latest-rust-1.79.0 AS chef +FROM --platform=${BUILDPLATFORM:-linux/amd64} lukemathwalker/cargo-chef:latest-rust-1.80.1 AS chef WORKDIR /coach FROM chef AS planner diff --git a/README.md b/README.md index ba349af..2f8436a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Those drills are run continuously to detect unexpected behaviors over a long per ## drills -- `collections_churn`: drill that keeps on creating and deleting the same collections +- `collections_churn`: drill that keeps on creating and deleting the same collections. - `points_churn`: drill that creates and deletes points in a collection. - `points_search`: drill that performs search requests on a collection. - `points_upsert`: drill that consistently updates the same points. diff --git a/src/common/client.rs b/src/common/client.rs index 29eb4d2..f45be25 100644 --- a/src/common/client.rs +++ b/src/common/client.rs @@ -5,18 +5,18 @@ use crate::common::generators::{ random_filter, random_named_vector, random_payload, random_vector, }; use anyhow::Context; -use qdrant_client::client::QdrantClient; use qdrant_client::qdrant::point_id::PointIdOptions; -use qdrant_client::qdrant::points_selector::PointsSelectorOneOf; use qdrant_client::qdrant::quantization_config::Quantization; use qdrant_client::qdrant::vectors_config::Config; use qdrant_client::qdrant::{ - CollectionInfo, CollectionStatus, CreateCollection, CreateSnapshotResponse, Distance, - FieldType, GetResponse, HnswConfigDiff, OptimizersConfigDiff, PointId, PointStruct, - PointsIdsList, PointsSelector, QuantizationConfig, RetrievedPoint, ScalarQuantization, - ScrollPoints, ScrollResponse, SearchPoints, SearchResponse, VectorParams, VectorParamsMap, - VectorsConfig, WithPayloadSelector, WithVectorsSelector, WriteOrdering, + CollectionInfo, CollectionStatus, CreateCollectionBuilder, CreateFieldIndexCollectionBuilder, + CreateSnapshotResponse, DeletePointsBuilder, DeleteSnapshotRequestBuilder, Distance, FieldType, + GetPointsBuilder, GetResponse, HnswConfigDiff, OptimizersConfigDiff, PointId, PointStruct, + QuantizationConfig, RetrievedPoint, ScalarQuantization, ScrollPointsBuilder, ScrollResponse, + SearchPointsBuilder, SearchResponse, SetPayloadPointsBuilder, UpdateCollectionBuilder, + UpsertPointsBuilder, VectorParams, VectorParamsMap, VectorsConfig, WriteOrdering, }; +use qdrant_client::Qdrant; use std::collections::HashMap; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; @@ -25,23 +25,13 @@ use tokio::time::sleep; /// Get point by id pub async fn get_point_by_id( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, point_id: u64, ) -> Result, anyhow::Error> { let point_id_grpc = point_id.into(); - // type inference issues forces to ascribe the types :shrug: - let with_vectors: Option = None; - let with_payload: Option = None; let point = client - .get_points( - collection_name, - None, - &[point_id_grpc], - with_vectors, - with_payload, - None, - ) + .get_points(GetPointsBuilder::new(collection_name, &[point_id_grpc])) .await .context(format!( "Failed to get point by id {} from {}", @@ -52,7 +42,7 @@ pub async fn get_point_by_id( /// upsert single point into collection (blocking) pub async fn upsert_point_by_id( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, point_id: u64, vec_dim: usize, @@ -70,20 +60,21 @@ pub async fn upsert_point_by_id( ); let points = vec![point_struct]; - client - .upsert_points_blocking(collection_name, None, points, write_ordering) - .await - .context(format!( - "Failed to update point_id:{} in {}", - point_id, collection_name - ))?; + let mut builder = UpsertPointsBuilder::new(collection_name, points).wait(true); + if let Some(write_ordering) = write_ordering { + builder = builder.ordering(write_ordering); + } + client.upsert_points(builder).await.context(format!( + "Failed to update point_id:{} in {}", + point_id, collection_name + ))?; Ok(()) } /// delete points (blocking) pub async fn delete_point_by_id( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, point_id: u64, ) -> Result<(), anyhow::Error> { @@ -93,15 +84,10 @@ pub async fn delete_point_by_id( // delete point let resp = client - .delete_points_blocking( - collection_name, - None, - &PointsSelector { - points_selector_one_of: Some(PointsSelectorOneOf::Points(PointsIdsList { - ids: points_selector, - })), - }, - None, + .delete_points( + DeletePointsBuilder::new(collection_name) + .points(points_selector) + .wait(true), ) .await .context(format!( @@ -121,7 +107,7 @@ pub async fn delete_point_by_id( /// Set payload (blocking) pub async fn set_payload( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, point_id: u64, payload_count: usize, @@ -133,26 +119,18 @@ pub async fn set_payload( point_id_options: Some(PointIdOptions::Num(point_id)), }]; - let points_selector = &PointsSelector { - points_selector_one_of: Some(PointsSelectorOneOf::Points(PointsIdsList { - ids: points_id_selector, - })), - }; + let mut builder = SetPayloadPointsBuilder::new(collection_name, payload) + .points_selector(points_id_selector) + .wait(true); - let resp = client - .set_payload_blocking( - collection_name, - None, - points_selector, - payload, - None, - write_ordering, - ) - .await - .context(format!( - "Failed to set payload for {} with payload_count {}", - point_id, payload_count - ))?; + if let Some(write_ordering) = write_ordering { + builder = builder.ordering(write_ordering); + } + + let resp = client.set_payload(builder).await.context(format!( + "Failed to set payload for {} with payload_count {}", + point_id, payload_count + ))?; if resp.result.unwrap().status != 2 { Err(anyhow::anyhow!( "Failed to set payload on point_id {} for {}", @@ -166,7 +144,7 @@ pub async fn set_payload( /// Search points pub async fn search_points( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, vec_dim: usize, payload_count: usize, @@ -174,23 +152,16 @@ pub async fn search_points( let query_vector = random_vector(vec_dim); let query_filter = random_filter(Some(payload_count)); + let mut builder = SearchPointsBuilder::new(collection_name, query_vector, 100) + .vector_name(DEFAULT_VECTOR_NAME.to_string()) + .with_payload(true); + + if let Some(query_filter) = query_filter { + builder = builder.filter(query_filter); + } + let response = client - .search_points(&SearchPoints { - collection_name: collection_name.to_string(), - vector: query_vector, - filter: query_filter, - limit: 100, - with_payload: Some(true.into()), - params: None, - score_threshold: None, - offset: None, - vector_name: Some(DEFAULT_VECTOR_NAME.to_string()), - with_vectors: None, - read_consistency: None, - shard_key_selector: None, - timeout: None, - sparse_indices: None, - }) + .search_points(builder) .await .context(format!("Failed to search points on {}", collection_name))?; @@ -198,25 +169,24 @@ pub async fn search_points( } /// Scroll points +#[allow(unused)] pub async fn scroll_points( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, payload_count: usize, ) -> Result { let query_filter = random_filter(Some(payload_count)); + let mut builder = ScrollPointsBuilder::new(collection_name) + .limit(100) + .with_payload(true); + + if let Some(query_filter) = query_filter { + builder = builder.filter(query_filter); + } + let response = client - .scroll(&ScrollPoints { - collection_name: collection_name.to_string(), - filter: query_filter, - limit: Some(100), - with_payload: Some(true.into()), - offset: None, - with_vectors: None, - read_consistency: None, - shard_key_selector: None, - order_by: None, - }) + .scroll(builder) .await .context(format!("Failed to scroll points on {}", collection_name))?; @@ -225,25 +195,13 @@ pub async fn scroll_points( /// Retrieve points pub async fn retrieve_points( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, ids: &[usize], ) -> Result { - // type inference issues forces to ascribe the types :shrug: - let with_vectors: Option = Some(true.into()); - let with_payload: Option = None; + let ids = ids.iter().map(|id| (*id as u64).into()).collect::>(); let response = client - .get_points( - collection_name, - None, - ids.iter() - .map(|id| (*id as u64).into()) - .collect::>() - .as_slice(), - with_vectors, - with_payload, - None, - ) + .get_points(GetPointsBuilder::new(collection_name, ids).with_vectors(true)) .await .context(format!("Failed to retrieve points on {}", collection_name))?; @@ -252,7 +210,7 @@ pub async fn retrieve_points( /// Get points count pub async fn get_points_count( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, ) -> Result { let point_count = client @@ -270,11 +228,11 @@ pub async fn get_points_count( /// delete points (blocking) pub async fn delete_points( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, points_count: usize, ) -> Result<(), anyhow::Error> { - let points_selector = (0..points_count as u64) + let points_selector: Vec<_> = (0..points_count as u64) .map(|id| PointId { point_id_options: Some(PointIdOptions::Num(id)), }) @@ -282,15 +240,10 @@ pub async fn delete_points( // delete all points let resp = client - .delete_points_blocking( - collection_name, - None, - &PointsSelector { - points_selector_one_of: Some(PointsSelectorOneOf::Points(PointsIdsList { - ids: points_selector, - })), - }, - None, + .delete_points( + DeletePointsBuilder::new(collection_name) + .points(points_selector) + .wait(true), ) .await .context(format!( @@ -309,19 +262,13 @@ pub async fn delete_points( } ///Disable indexing -pub async fn disable_indexing( - client: &QdrantClient, - collection_name: &str, -) -> Result<(), anyhow::Error> { +pub async fn disable_indexing(client: &Qdrant, collection_name: &str) -> Result<(), anyhow::Error> { set_indexing_threshold(client, collection_name, usize::MAX).await?; Ok(()) } /// Enable indexing -pub async fn enable_indexing( - client: &QdrantClient, - collection_name: &str, -) -> Result<(), anyhow::Error> { +pub async fn enable_indexing(client: &Qdrant, collection_name: &str) -> Result<(), anyhow::Error> { // 1000 is the min possible value set_indexing_threshold(client, collection_name, 1000).await?; Ok(()) @@ -329,22 +276,16 @@ pub async fn enable_indexing( /// Set indexing threshold pub async fn set_indexing_threshold( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, threshold: usize, ) -> Result<(), anyhow::Error> { client .update_collection( - collection_name, - Some(&OptimizersConfigDiff { + UpdateCollectionBuilder::new(collection_name).optimizers_config(OptimizersConfigDiff { indexing_threshold: Some(threshold as u64), ..Default::default() }), - None, - None, - None, - None, - None, ) .await .context(format!( @@ -355,23 +296,18 @@ pub async fn set_indexing_threshold( } /// Set mmap threshold +#[allow(unused)] pub async fn set_mmap_threshold( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, threshold: usize, ) -> Result<(), anyhow::Error> { client .update_collection( - collection_name, - Some(&OptimizersConfigDiff { + UpdateCollectionBuilder::new(collection_name).optimizers_config(OptimizersConfigDiff { memmap_threshold: Some(threshold as u64), ..Default::default() }), - None, - None, - None, - None, - None, ) .await .context(format!( @@ -382,23 +318,18 @@ pub async fn set_mmap_threshold( } /// Set max segment size +#[allow(unused)] pub async fn set_max_segment_size( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, size: usize, ) -> Result<(), anyhow::Error> { client .update_collection( - collection_name, - Some(&OptimizersConfigDiff { + UpdateCollectionBuilder::new(collection_name).optimizers_config(OptimizersConfigDiff { max_segment_size: Some(size as u64), ..Default::default() }), - None, - None, - None, - None, - None, ) .await .context(format!( @@ -410,7 +341,7 @@ pub async fn set_max_segment_size( /// Get collection info pub async fn get_collection_info( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, ) -> Result, anyhow::Error> { let collection_info = client @@ -426,12 +357,12 @@ pub async fn get_collection_info( /// Get collection status pub async fn get_collection_status( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, ) -> Result { let info = get_collection_info(client, collection_name).await; match info { - Ok(Some(info)) => Ok(CollectionStatus::try_from(info.status).unwrap()), + Ok(Some(info)) => Ok(CollectionStatus::try_from(info.status)?), Ok(None) => Err(anyhow::anyhow!( "Failed to get non-empty collection status for {}", collection_name @@ -446,7 +377,7 @@ pub async fn get_collection_status( /// Wait for collection to be indexed pub async fn wait_index( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, stopped: Arc, ) -> Result { @@ -476,78 +407,73 @@ const UNUSED_VECTOR_NAME: &str = "unused_coach_vector"; /// Create collection pub async fn create_collection( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, vec_dim: usize, args: Arc, ) -> Result<(), anyhow::Error> { - client - .create_collection(&CreateCollection { - collection_name: collection_name.to_string(), - vectors_config: Some(VectorsConfig { - config: Some(Config::ParamsMap(VectorParamsMap { - map: vec![ - ( - DEFAULT_VECTOR_NAME.to_string(), - VectorParams { - size: vec_dim as u64, - distance: Distance::Cosine.into(), - hnsw_config: Some(HnswConfigDiff { - m: None, - ef_construct: None, - full_scan_threshold: None, - max_indexing_threads: args - .max_indexing_threads - .map(|i| i as u64), - on_disk: Some(args.hnsw_on_disk), - payload_m: None, - }), - quantization_config: if args.use_scalar_quantization { - Some(QuantizationConfig { - quantization: Some(Quantization::Scalar( - ScalarQuantization { - r#type: 1, //Int8 - quantile: None, - always_ram: Some(true), - }, - )), - }) - } else { - None - }, - on_disk: Some(args.vectors_on_disk), - datatype: None, + let mut builder = CreateCollectionBuilder::new(collection_name) + .vectors_config(VectorsConfig { + config: Some(Config::ParamsMap(VectorParamsMap { + map: vec![ + ( + DEFAULT_VECTOR_NAME.to_string(), + VectorParams { + size: vec_dim as u64, + distance: Distance::Cosine.into(), + hnsw_config: Some(HnswConfigDiff { + m: None, + ef_construct: None, + full_scan_threshold: None, + max_indexing_threads: args.max_indexing_threads.map(|i| i as u64), + on_disk: Some(args.hnsw_on_disk), + payload_m: None, + }), + quantization_config: if args.use_scalar_quantization { + Some(QuantizationConfig { + quantization: Some(Quantization::Scalar(ScalarQuantization { + r#type: 1, //Int8 + quantile: None, + always_ram: Some(true), + })), + }) + } else { + None }, - ), - ( - UNUSED_VECTOR_NAME.to_string(), // unused vector to generate more complex config - VectorParams { - size: vec_dim as u64, - distance: Distance::Cosine.into(), - on_disk: Some(args.vectors_on_disk), - ..Default::default() - }, - ), - ] - .into_iter() - .collect::>(), - })), - }), - replication_factor: Some(args.replication_factor as u32), - shard_number: if args.shard_number == 0 { - None - } else { - Some(args.shard_number as u32) - }, - write_consistency_factor: Some(args.write_consistency_factor as u32), - on_disk_payload: Some(args.payload_on_disk), - optimizers_config: Some(OptimizersConfigDiff { - indexing_threshold: args.indexing_threshold.map(|i| i as u64), - memmap_threshold: args.memmap_threshold.map(|i| i as u64), - ..Default::default() - }), - ..Default::default() + on_disk: Some(args.vectors_on_disk), + datatype: None, + multivector_config: None, + }, + ), + ( + UNUSED_VECTOR_NAME.to_string(), // unused vector to generate more complex config + VectorParams { + size: vec_dim as u64, + distance: Distance::Cosine.into(), + on_disk: Some(args.vectors_on_disk), + ..Default::default() + }, + ), + ] + .into_iter() + .collect::>(), + })), }) + .replication_factor(args.replication_factor as u32) + .write_consistency_factor(args.write_consistency_factor as u32) + .on_disk_payload(args.payload_on_disk) + .optimizers_config(OptimizersConfigDiff { + indexing_threshold: args.indexing_threshold.map(|i| i as u64), + memmap_threshold: args.memmap_threshold.map(|i| i as u64), + ..Default::default() + }); + + if args.shard_number > 0 { + builder = builder.shard_number(args.shard_number as u32); + } + + client + .create_collection(builder) .await .context(format!("Failed to create collection {}", collection_name))?; Ok(()) @@ -555,11 +481,11 @@ pub async fn create_collection( /// delete collection without checking if it exists pub async fn delete_collection( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, ) -> Result<(), anyhow::Error> { client - .delete_collection(&collection_name) + .delete_collection(collection_name) .await .context(format!("Failed to delete collection {}", collection_name))?; Ok(()) @@ -567,12 +493,12 @@ pub async fn delete_collection( /// delete collection if exists & create new one pub async fn recreate_collection( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, vec_dim: usize, args: Arc, ) -> Result<(), anyhow::Error> { - if client.collection_exists(&collection_name).await? { + if client.collection_exists(collection_name).await? { log::info!("recreating existing collection {}", collection_name); delete_collection(client, collection_name).await?; sleep(Duration::from_secs(2)).await; @@ -584,7 +510,7 @@ pub async fn recreate_collection( /// vec_dim = 0 means no vectors /// payload_count = 0 means no payloads pub async fn insert_points_batch( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, points_count: usize, vec_dim: usize, @@ -636,15 +562,16 @@ pub async fn insert_points_batch( return Err(Cancelled); } + let mut builder = UpsertPointsBuilder::new(collection_name, points).wait(true); + if let Some(write_ordering) = write_ordering { + builder = builder.ordering(write_ordering); + } // push batch blocking - let resp = client - .upsert_points_blocking(collection_name, None, points, write_ordering.clone()) - .await - .context(format!( - "Failed to insert {} points (batch {}/{}) into {}", - batch_size, batch_id, num_batches, collection_name - ))?; - if resp.result.clone().unwrap().status != 2 { + let resp = client.upsert_points(builder).await.context(format!( + "Failed to insert {} points (batch {}/{}) into {}", + batch_size, batch_id, num_batches, collection_name + ))?; + if resp.result.unwrap().status != 2 { return Err(Invariant(format!( "Failed to insert {} points (batch {}/{}) into {} (status {})", batch_size, @@ -660,11 +587,11 @@ pub async fn insert_points_batch( /// Create collection snapshot pub async fn create_collection_snapshot( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, ) -> Result { client - .create_snapshot(&collection_name) + .create_snapshot(collection_name) .await .context(format!( "Failed to create collection snapshot for {}", @@ -674,12 +601,15 @@ pub async fn create_collection_snapshot( /// Delete collection snapshot by name pub async fn delete_collection_snapshot( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, snapshot_name: &str, ) -> Result<(), anyhow::Error> { client - .delete_snapshot(&collection_name, snapshot_name) + .delete_snapshot(DeleteSnapshotRequestBuilder::new( + collection_name, + snapshot_name, + )) .await .context(format!( "Failed to delete collection snapshot {} for {}", @@ -690,11 +620,11 @@ pub async fn delete_collection_snapshot( /// List collection snapshots pub async fn list_collection_snapshots( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, ) -> Result, anyhow::Error> { let snapshots = client - .list_snapshots(&collection_name) + .list_snapshots(collection_name) .await .context(format!( "Failed to list collection snapshots for {}", @@ -709,50 +639,24 @@ pub async fn list_collection_snapshots( /// Count collection snapshots pub async fn count_collection_snapshots( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, ) -> Result { let snapshots = list_collection_snapshots(client, collection_name).await?; Ok(snapshots.len()) } -/// Create field index (blocking) -pub async fn create_field_index_blocking( - client: &QdrantClient, - collection_name: &str, - field_name: &str, - field_type: FieldType, -) -> Result<(), anyhow::Error> { - client - .create_field_index_blocking( - collection_name.to_string(), - field_name.to_string(), - field_type, - None, - None, - ) - .await - .context(format!( - "Failed to create field index {} for collection {}", - field_name, collection_name - ))?; - Ok(()) -} - -/// Create field index +/// Create field index (non-blocking) pub async fn create_field_index( - client: &QdrantClient, + client: &Qdrant, collection_name: &str, field_name: &str, field_type: FieldType, ) -> Result<(), anyhow::Error> { client .create_field_index( - collection_name.to_string(), - field_name.to_string(), - field_type, - None, - None, + CreateFieldIndexCollectionBuilder::new(collection_name, field_name, field_type) + .wait(false), ) .await .context(format!( diff --git a/src/common/coach_errors.rs b/src/common/coach_errors.rs index b0f639e..e4fb74a 100644 --- a/src/common/coach_errors.rs +++ b/src/common/coach_errors.rs @@ -17,3 +17,9 @@ impl From for CoachError { CoachError::Client(e) } } + +impl From for CoachError { + fn from(e: qdrant_client::QdrantError) -> Self { + Self::Client(e.into()) + } +} diff --git a/src/common/generators.rs b/src/common/generators.rs index d2acc19..0773de1 100644 --- a/src/common/generators.rs +++ b/src/common/generators.rs @@ -1,8 +1,8 @@ use core::option::Option; use core::option::Option::{None, Some}; -use qdrant_client::client::Payload; use qdrant_client::qdrant::r#match::MatchValue; use qdrant_client::qdrant::{FieldCondition, Filter, Match}; +use qdrant_client::Payload; use rand::Rng; use std::collections::HashMap; diff --git a/src/common/mod.rs b/src/common/mod.rs index 49d7b68..9e883a4 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -1,4 +1,3 @@ -#![allow(unused)] pub mod client; pub mod coach_errors; pub mod generators; diff --git a/src/drill_runner.rs b/src/drill_runner.rs index 066640a..568f489 100644 --- a/src/drill_runner.rs +++ b/src/drill_runner.rs @@ -17,7 +17,7 @@ use log::debug; use log::error; use log::info; use log::warn; -use qdrant_client::client::QdrantClient; +use qdrant_client::Qdrant; use std::collections::HashMap; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; @@ -34,9 +34,9 @@ pub trait Drill: Send + Sync { // delay between runs fn reschedule_after_sec(&self) -> u64; // run drill - async fn run(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError>; + async fn run(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError>; // run before the first run - async fn before_all(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError>; + async fn before_all(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError>; } struct DrillReport { @@ -73,7 +73,10 @@ pub async fn run_drills(args: Args, stopped: Arc) -> Result>() }; - let mut drill_tasks = vec![]; + if drills_to_run.is_empty() { + error!("No drills to run - make sure the drill names are correct"); + return Err(anyhow::anyhow!("No drills to run")); + } info!( "Coach is scheduling {} drills against {:?} (by batch of {}):", @@ -93,10 +96,11 @@ pub async fn run_drills(args: Args, stopped: Arc) -> Result) -> Result) -> Result<(), CoachError> { + async fn run(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // delete if already exists if client.collection_exists(&self.collection_name).await? { delete_collection(client, &self.collection_name).await?; @@ -200,7 +200,7 @@ impl Drill for CollectionConcurrentLifecycle { Ok(()) } - async fn before_all(&self, _client: &QdrantClient, _args: Arc) -> Result<(), CoachError> { + async fn before_all(&self, _client: &Qdrant, _args: Arc) -> Result<(), CoachError> { // no need to explicitly honor args.recreate_collection // because we are going to delete the collection anyway Ok(()) diff --git a/src/drills/collection_snapshots_churn.rs b/src/drills/collection_snapshots_churn.rs index 69578b3..27a4efc 100644 --- a/src/drills/collection_snapshots_churn.rs +++ b/src/drills/collection_snapshots_churn.rs @@ -1,5 +1,4 @@ use anyhow::Result; -use qdrant_client::client::QdrantClient; use std::sync::atomic::AtomicBool; use std::sync::Arc; @@ -13,6 +12,7 @@ use crate::common::coach_errors::CoachError; use crate::common::coach_errors::CoachError::Invariant; use crate::drill_runner::Drill; use async_trait::async_trait; +use qdrant_client::Qdrant; /// Drill that creates and deletes points in a collection. /// The collection is created and populated with random data if it does not exist. @@ -29,7 +29,7 @@ impl CollectionSnapshotsChurn { let collection_name = "collection-snapshot-drill".to_string(); let vec_dim = 128; let payload_count = 2; - let points_count = 200_000; + let points_count = 10_000; CollectionSnapshotsChurn { collection_name, points_count, @@ -50,7 +50,7 @@ impl Drill for CollectionSnapshotsChurn { 10 } - async fn run(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn run(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // create and populate collection if it does not exist if !client.collection_exists(&self.collection_name).await? { // create collection @@ -119,7 +119,7 @@ impl Drill for CollectionSnapshotsChurn { Ok(()) } - async fn before_all(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn before_all(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // honor args.recreate_collection if args.recreate_collection { recreate_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?; diff --git a/src/drills/collections_churn.rs b/src/drills/collections_churn.rs index 47cec33..4ab0d68 100644 --- a/src/drills/collections_churn.rs +++ b/src/drills/collections_churn.rs @@ -9,8 +9,8 @@ use crate::common::generators::KEYWORD_PAYLOAD_KEY; use crate::drill_runner::Drill; use anyhow::Result; use async_trait::async_trait; -use qdrant_client::client::QdrantClient; use qdrant_client::qdrant::FieldType; +use qdrant_client::Qdrant; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use std::time::Duration; @@ -51,7 +51,7 @@ impl Drill for CollectionsChurn { 10 } - async fn run(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn run(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // cleanup potential left-over previous collections for i in 0..self.collection_count { if self.stopped.load(Ordering::Relaxed) { @@ -114,7 +114,7 @@ impl Drill for CollectionsChurn { Ok(()) } - async fn before_all(&self, _client: &QdrantClient, _args: Arc) -> Result<(), CoachError> { + async fn before_all(&self, _client: &Qdrant, _args: Arc) -> Result<(), CoachError> { // no need to explicitly honor args.recreate_collection // because we are going to delete the collection anyway Ok(()) diff --git a/src/drills/high_concurrency.rs b/src/drills/high_concurrency.rs index 8e546c3..070150e 100644 --- a/src/drills/high_concurrency.rs +++ b/src/drills/high_concurrency.rs @@ -1,5 +1,4 @@ use anyhow::Result; -use qdrant_client::client::QdrantClient; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; @@ -15,6 +14,7 @@ use crate::get_config; use async_trait::async_trait; use futures::StreamExt; use qdrant_client::qdrant::WriteOrdering; +use qdrant_client::Qdrant; /// Drill that performs operations on a collection with a high level of concurrency (without indexing). /// Run `concurrency_level` workers which repeatedly call APIs for inserting -> searching -> set payload -> updating -> getting one -> deleting @@ -48,7 +48,7 @@ impl HighConcurrency { } } - async fn run_for_point(&self, client: &QdrantClient, point_id: u64) -> Result<(), CoachError> { + async fn run_for_point(&self, client: &Qdrant, point_id: u64) -> Result<(), CoachError> { // insert single point upsert_point_by_id( client, @@ -56,7 +56,7 @@ impl HighConcurrency { point_id, self.vec_dim, self.payload_count, - self.write_ordering.clone(), + self.write_ordering, ) .await?; @@ -75,7 +75,7 @@ impl HighConcurrency { &self.collection_name, point_id, self.payload_count, - self.write_ordering.clone(), + self.write_ordering, ) .await?; @@ -86,7 +86,7 @@ impl HighConcurrency { point_id, self.vec_dim, self.payload_count, - self.write_ordering.clone(), + self.write_ordering, ) .await?; @@ -105,7 +105,7 @@ impl HighConcurrency { Ok(()) } - fn pick_random<'a>(&self, clients: &'a [QdrantClient]) -> &'a QdrantClient { + fn pick_random<'a>(&self, clients: &'a [Qdrant]) -> &'a Qdrant { let index = rand::random::() % clients.len(); &clients[index] } @@ -121,7 +121,7 @@ impl Drill for HighConcurrency { 10 } - async fn run(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn run(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // delete if already exists if client.collection_exists(&self.collection_name).await? { delete_collection(client, &self.collection_name).await?; @@ -133,7 +133,7 @@ impl Drill for HighConcurrency { // workers will target random clients for all nodes to stress the cluster let mut target_clients = vec![]; for uri in &args.uris { - let target_client = QdrantClient::new(Some(get_config(uri, args.grpc_timeout_ms)))?; + let target_client = Qdrant::new(get_config(uri, args.grpc_timeout_ms))?; target_clients.push(target_client); } @@ -161,7 +161,7 @@ impl Drill for HighConcurrency { Ok(()) } - async fn before_all(&self, _client: &QdrantClient, _args: Arc) -> Result<(), CoachError> { + async fn before_all(&self, _client: &Qdrant, _args: Arc) -> Result<(), CoachError> { // no need to explicitly honor args.recreate_collection // because we are going to delete the collection anyway Ok(()) diff --git a/src/drills/large_retrieve.rs b/src/drills/large_retrieve.rs index d7a242c..73d409a 100644 --- a/src/drills/large_retrieve.rs +++ b/src/drills/large_retrieve.rs @@ -1,5 +1,4 @@ use anyhow::Result; -use qdrant_client::client::QdrantClient; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; @@ -11,6 +10,7 @@ use crate::common::coach_errors::CoachError; use crate::common::coach_errors::CoachError::{Cancelled, Invariant}; use crate::drill_runner::Drill; use async_trait::async_trait; +use qdrant_client::Qdrant; /// Drill that performs large retrieve requests on a collection. /// The collection is created and populated with random data if it does not exist. @@ -51,7 +51,7 @@ impl Drill for LargeRetrieve { 10 } - async fn run(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn run(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // create and populate collection if it does not exist if !client.collection_exists(&self.collection_name).await? { log::info!("The large retrieve drill needs to setup the collection first"); @@ -100,7 +100,7 @@ impl Drill for LargeRetrieve { Ok(()) } - async fn before_all(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn before_all(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // honor args.recreate_collection if args.recreate_collection { recreate_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?; diff --git a/src/drills/points_churn.rs b/src/drills/points_churn.rs index 02f792c..72e77a7 100644 --- a/src/drills/points_churn.rs +++ b/src/drills/points_churn.rs @@ -1,5 +1,4 @@ use anyhow::Result; -use qdrant_client::client::QdrantClient; use std::sync::atomic::AtomicBool; use std::sync::Arc; @@ -12,6 +11,7 @@ use crate::common::coach_errors::CoachError; use crate::common::coach_errors::CoachError::Invariant; use crate::drill_runner::Drill; use async_trait::async_trait; +use qdrant_client::Qdrant; /// Drill that creates and deletes points in a collection. /// The collection is created and populated with random data if it does not exist. @@ -49,7 +49,7 @@ impl Drill for PointsChurn { 10 } - async fn run(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn run(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // create and populate collection if it does not exist if !client.collection_exists(&self.collection_name).await? { log::info!("The points churn drill needs to setup the collection first"); @@ -95,7 +95,7 @@ impl Drill for PointsChurn { Ok(()) } - async fn before_all(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn before_all(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // honor args.recreate_collection if args.recreate_collection { recreate_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?; diff --git a/src/drills/points_optional_vectors.rs b/src/drills/points_optional_vectors.rs index eff1fa0..96336e0 100644 --- a/src/drills/points_optional_vectors.rs +++ b/src/drills/points_optional_vectors.rs @@ -1,5 +1,4 @@ use anyhow::Result; -use qdrant_client::client::QdrantClient; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; @@ -13,6 +12,7 @@ use crate::common::coach_errors::CoachError::{Cancelled, Invariant}; use crate::drill_runner::Drill; use async_trait::async_trait; use qdrant_client::qdrant::WriteOrdering; +use qdrant_client::Qdrant; /// Drill that creates empty points in a collection. /// Those points are progressively filled with payload and named vectors. @@ -53,7 +53,7 @@ impl Drill for PointsOptionalVectors { 10 } - async fn run(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn run(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // create and populate collection if it does not exist if !client.collection_exists(&self.collection_name).await? { log::info!("The points optional vectors drill needs to setup the collection first"); @@ -90,7 +90,7 @@ impl Drill for PointsOptionalVectors { &self.collection_name, point_id as u64, self.payload_count, - self.write_ordering.clone(), + self.write_ordering, ) .await?; } @@ -106,7 +106,7 @@ impl Drill for PointsOptionalVectors { point_id as u64, self.vec_dim, 0, - self.write_ordering.clone(), + self.write_ordering, ) .await?; } @@ -126,7 +126,7 @@ impl Drill for PointsOptionalVectors { Ok(()) } - async fn before_all(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn before_all(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // honor args.recreate_collection if args.recreate_collection { recreate_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?; diff --git a/src/drills/points_search.rs b/src/drills/points_search.rs index 4023187..be26ef0 100644 --- a/src/drills/points_search.rs +++ b/src/drills/points_search.rs @@ -1,5 +1,4 @@ use anyhow::Result; -use qdrant_client::client::QdrantClient; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; @@ -12,6 +11,7 @@ use crate::common::coach_errors::CoachError; use crate::common::coach_errors::CoachError::{Cancelled, Invariant}; use crate::drill_runner::Drill; use async_trait::async_trait; +use qdrant_client::Qdrant; /// Drill that performs search requests on a collection. /// The collection is created and populated with random data if it does not exist. @@ -52,7 +52,7 @@ impl Drill for PointsSearch { 10 } - async fn run(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn run(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // create and populate collection if it does not exist if !client.collection_exists(&self.collection_name).await? { log::info!("The search drill needs to setup the collection first"); @@ -104,7 +104,7 @@ impl Drill for PointsSearch { Ok(()) } - async fn before_all(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn before_all(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // honor args.recreate_collection if args.recreate_collection { recreate_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?; diff --git a/src/drills/points_upsert.rs b/src/drills/points_upsert.rs index 074c080..7f5e84b 100644 --- a/src/drills/points_upsert.rs +++ b/src/drills/points_upsert.rs @@ -1,5 +1,4 @@ use anyhow::Result; -use qdrant_client::client::QdrantClient; use std::sync::atomic::AtomicBool; use std::sync::Arc; @@ -11,6 +10,7 @@ use crate::common::coach_errors::CoachError; use crate::common::coach_errors::CoachError::Invariant; use crate::drill_runner::Drill; use async_trait::async_trait; +use qdrant_client::Qdrant; /// Drill that consistently updates the same points. /// The collection is created and populated with random data if it does not exist. @@ -48,10 +48,10 @@ impl Drill for PointsUpdate { 10 } - async fn run(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn run(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // create if it does not exist if !client.collection_exists(&self.collection_name).await? { - log::info!("The update drill needs to setup the collection first"); + log::info!("The points update drill needs to setup the collection first"); create_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?; // insert some points @@ -108,7 +108,7 @@ impl Drill for PointsUpdate { Ok(()) } - async fn before_all(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn before_all(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // honor args.recreate_collection if args.recreate_collection { recreate_collection(client, &self.collection_name, self.vec_dim, args.clone()).await?; diff --git a/src/drills/toggle_indexing.rs b/src/drills/toggle_indexing.rs index 71aa142..e6f966f 100644 --- a/src/drills/toggle_indexing.rs +++ b/src/drills/toggle_indexing.rs @@ -1,5 +1,4 @@ use anyhow::Result; -use qdrant_client::client::QdrantClient; use qdrant_client::qdrant::CollectionStatus; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; @@ -13,6 +12,7 @@ use crate::common::coach_errors::CoachError; use crate::common::coach_errors::CoachError::{Cancelled, Invariant}; use crate::drill_runner::Drill; use async_trait::async_trait; +use qdrant_client::Qdrant; /// Drill that performs index toggle on a collection. /// The collection is always re-created and populated with random data. @@ -53,7 +53,7 @@ impl Drill for ToggleIndexing { 10 } - async fn run(&self, client: &QdrantClient, args: Arc) -> Result<(), CoachError> { + async fn run(&self, client: &Qdrant, args: Arc) -> Result<(), CoachError> { // delete if already exists if client.collection_exists(&self.collection_name).await? { delete_collection(client, &self.collection_name).await?; @@ -123,7 +123,7 @@ impl Drill for ToggleIndexing { Ok(()) } - async fn before_all(&self, _client: &QdrantClient, _args: Arc) -> Result<(), CoachError> { + async fn before_all(&self, _client: &Qdrant, _args: Arc) -> Result<(), CoachError> { // no need to explicitly honor args.recreate_collection // because we are going to delete the collection anyway Ok(()) diff --git a/src/healthcheck.rs b/src/healthcheck.rs index 9cb2d1c..356fa7a 100644 --- a/src/healthcheck.rs +++ b/src/healthcheck.rs @@ -5,7 +5,7 @@ use anyhow::Result; use hdrhistogram::Histogram; use log::error; use log::info; -use qdrant_client::client::QdrantClient; +use qdrant_client::Qdrant; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use std::time::Duration; @@ -22,7 +22,7 @@ pub async fn run_healthcheck(args: Args, stopped: Arc) -> Result) -> Result anyhow::Result<()> { Ok(()) } -fn get_config(url: &str, timeout_ms: usize) -> QdrantClientConfig { - let mut config = QdrantClientConfig::from_url(url); +fn get_config(url: &str, timeout_ms: usize) -> QdrantConfig { + let mut config = QdrantConfig::from_url(url); config.timeout = Duration::from_millis(timeout_ms as u64); config.connect_timeout = Duration::from_millis(timeout_ms as u64);