Skip to content

Commit 228c0ca

Browse files
sjuddConvex, Inc.
authored and
Convex, Inc.
committed
Update Rust to nightly 2/28/24, Qdrant to 1.8.4 (#24741)
GitOrigin-RevId: 4a2e5f4f86a3ff0ee6362fc1892ba53d6e35e216
1 parent c5e7454 commit 228c0ca

File tree

22 files changed

+1372
-1410
lines changed

22 files changed

+1372
-1410
lines changed

Cargo.lock

Lines changed: 1229 additions & 1329 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ base64 = "0.13"
1919
biscuit = "0.7.0"
2020
bitvec = "1.0.1"
2121
byteorder = "1.5.0"
22-
bytes = "1.1.0"
22+
bytes = "1.5.0"
2323
bytesize = "1.3.0"
2424
cfg-if = "1.0"
2525
chrono = "0.4.26"
@@ -56,7 +56,7 @@ hyper = "0.14.16"
5656
proc-macro2 = { version = "1.0" }
5757
imbl = "2.0.0"
5858
itertools = "0.12"
59-
jsonschema = "0.17.0"
59+
jsonschema = "0.17.1"
6060
levenshtein_automata = "0.2.1"
6161
lru = "0.12.0"
6262
maplit = "1"
@@ -84,7 +84,8 @@ prost = "0.12"
8484
prost-types = "0.12"
8585
pyo3 = "0.19.1"
8686
pyo3-asyncio = { version = "0.19.0", features = [ "tokio-runtime" ] }
87-
qdrant_segment = { git = "https://github.com/get-convex/qdrant", rev = "76482c6e62dd37c2bcb30a298e6538678df1bd27", package = "segment" }
87+
qdrant_segment = { git = "https://github.com/get-convex/qdrant", rev = "8819071e5c14a602d13a048a83cde38698f5b306", package = "segment" }
88+
qdrant_common = { git = "https://github.com/get-convex/qdrant", rev = "8819071e5c14a602d13a048a83cde38698f5b306", package = "qdrant_common" }
8889
quote = "1.0"
8990
rand = "0.8"
9091
rand_chacha = "0.3.1"

crates/common/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
#![feature(let_chains)]
1111
#![feature(nonzero_ops)]
1212
#![feature(lazy_cell)]
13-
#![feature(result_option_inspect)]
1413
#![feature(try_blocks)]
1514
#![feature(type_alias_impl_trait)]
1615
#![feature(bound_as_ref)]
17-
#![feature(bound_map)]
1816
#![feature(iter_from_coroutine)]
1917
#![feature(iterator_try_collect)]
2018
#![feature(const_trait_impl)]

crates/convex/Cargo.oss.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = "Client library for Convex (convex.dev)"
44
authors = [ "Convex, Inc. <[email protected]>" ]
55
version = "0.6.0"
66
edition = "2021"
7-
rust-version = "1.65.0"
7+
rust-version = "1.71.0"
88
resolver = "2"
99
license = "Apache-2.0"
1010
repository = "https://github.com/get-convex/convex-rs"
@@ -14,7 +14,7 @@ homepage = "https://www.convex.dev/"
1414
anyhow = { version = "1" }
1515
async-trait = { version = "0.1" }
1616
base64 = { version = "0.13" }
17-
bytes = { version = "1.1.0" }
17+
bytes = { version = "1.5.0" }
1818
convex_sync_types = { path = "./sync_types", version = "=0.6.0" }
1919
futures = { version = "0.3" }
2020
imbl = { version = "2.0.0" }

crates/convex/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = "Client library for Convex (convex.dev)"
44
authors = ["Convex, Inc. <[email protected]>"]
55
version = "0.6.0"
66
edition = "2021"
7-
rust-version = "1.65.0"
7+
rust-version = "1.71.0"
88
resolver = "2"
99
license = "Apache-2.0"
1010
repository = "https://github.com/get-convex/convex-rs"

crates/convex/sync_types/Cargo.oss.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = "Sync types for the Convex Websocket protocol (convex.dev)"
44
version = "0.6.0"
55
authors = [ "Convex, Inc. <[email protected]>" ]
66
edition = "2021"
7-
rust-version = "1.65.0"
7+
rust-version = "1.71.0"
88
resolver = "2"
99
license = "Apache-2.0"
1010
repository = "https://github.com/get-convex/convex-rs"

crates/convex/sync_types/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = "Sync types for the Convex Websocket protocol (convex.dev)"
44
version = "0.6.0"
55
authors = ["Convex, Inc. <[email protected]>"]
66
edition = "2021"
7-
rust-version = "1.65.0"
7+
rust-version = "1.71.0"
88
resolver = "2"
99
license = "Apache-2.0"
1010
repository = "https://github.com/get-convex/convex-rs"

crates/database/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@
77
#![feature(lazy_cell)]
88
#![feature(const_option)]
99
#![feature(is_sorted)]
10-
#![feature(bound_map)]
1110
#![feature(iterator_try_collect)]
1211
#![feature(never_type)]
1312
#![feature(try_blocks)]
1413
#![feature(exclusive_range_pattern)]
1514
#![feature(async_closure)]
16-
#![feature(trait_upcasting)]
1715
#![feature(impl_trait_in_assoc_type)]
1816
#![feature(cow_is_borrowed)]
17+
#![feature(trait_upcasting)]
1918

2019
mod bootstrap_model;
2120
mod committer;

crates/function_runner/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(lazy_cell)]
2-
#![feature(arc_unwrap_or_clone)]
32
#![feature(iterator_try_collect)]
43
#![feature(impl_trait_in_assoc_type)]
54
#![feature(try_blocks)]

crates/indexing/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![feature(async_closure)]
22
#![feature(bound_as_ref)]
3-
#![feature(bound_map)]
43
#![feature(coroutines)]
54
#![feature(proc_macro_hygiene)]
65
#![feature(stmt_expr_attributes)]

crates/isolate/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#![feature(never_type)]
1111
#![feature(assert_matches)]
1212
#![feature(impl_trait_in_assoc_type)]
13-
#![feature(arc_unwrap_or_clone)]
1413
#![feature(round_char_boundary)]
1514

1615
pub mod bundled_js;

crates/local_backend/src/subs/mod.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ mod tests {
370370
Message,
371371
WebSocket,
372372
},
373+
State,
373374
WebSocketUpgrade,
374375
},
375376
routing::get,
@@ -389,10 +390,14 @@ mod tests {
389390
/// backend in `is_connection_closed_error` to work around axum sloppiness.
390391
#[tokio::test]
391392
async fn test_ws_tungstenite_version_match() -> anyhow::Result<()> {
392-
let (mut ws_shutdown_tx, mut ws_shutdown_rx) = futures::channel::mpsc::channel(1);
393+
let (ws_shutdown_tx, mut ws_shutdown_rx) = futures::channel::mpsc::channel(1);
393394

394-
let ws_handler = async move |ws: WebSocketUpgrade| {
395+
async fn ws_handler(
396+
ws: WebSocketUpgrade,
397+
st: State<futures::channel::mpsc::Sender<bool>>,
398+
) -> axum::response::Response {
395399
ws.on_upgrade(move |mut ws: WebSocket| async move {
400+
let mut ws_shutdown_tx = st.0;
396401
assert_eq!(ws.recv().await.unwrap().unwrap(), Message::Close(None));
397402
let e = ws
398403
.send(Message::Text("Hello".to_string()))
@@ -410,9 +415,13 @@ mod tests {
410415
TungsteniteError::ConnectionClosed
411416
);
412417
})
413-
};
418+
}
414419

415-
let app = ConvexHttpService::new_for_test(Router::new().route("/test", get(ws_handler)));
420+
let app = ConvexHttpService::new_for_test(
421+
Router::new()
422+
.route("/test", get(ws_handler))
423+
.with_state(ws_shutdown_tx),
424+
);
416425
let port = portpicker::pick_unused_port().expect("No ports free");
417426
let addr = format!("127.0.0.1:{port}").parse()?;
418427
let (shutdown_tx, shutdown_rx) = futures::channel::oneshot::channel();

crates/model/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@
2525
#![feature(lazy_cell)]
2626
#![feature(const_option)]
2727
#![feature(is_sorted)]
28-
#![feature(bound_map)]
2928
#![feature(iterator_try_collect)]
3029
#![feature(never_type)]
3130
#![feature(try_blocks)]
3231
#![feature(exclusive_range_pattern)]
3332
#![feature(async_closure)]
34-
#![feature(trait_upcasting)]
3533
#![feature(impl_trait_in_assoc_type)]
3634

3735
use std::{

crates/search/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![feature(iter_from_coroutine, coroutines)]
22
#![feature(let_chains)]
33
#![feature(lazy_cell)]
4-
#![feature(slice_group_by)]
54
#![feature(try_blocks)]
65
#![feature(is_sorted)]
76
#![feature(ptr_metadata)]

crates/search/src/searcher/searcher.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,20 +224,19 @@ impl<RT: Runtime> SearcherImpl<RT> {
224224
let start = Instant::now();
225225
let result = schema.search(
226226
&segment,
227-
&query,
227+
query,
228228
overfetch_delta,
229229
slow_query_threshold,
230230
require_exact,
231231
);
232232
let query_duration = Instant::now().duration_since(start);
233233
if query_duration > Duration::from_millis(slow_query_threshold) {
234234
tracing::warn!(
235-
"Slow vector query, duration: {}ms, results: {:?} schema: {:?}, query: {:?}, \
235+
"Slow vector query, duration: {}ms, results: {:?} schema: {:?}, \
236236
overfetch_delta: {overfetch_delta}",
237237
query_duration.as_millis(),
238238
result.as_ref().map(|value| value.len()),
239239
schema,
240-
query,
241240
)
242241
}
243242
timer.finish();

crates/storage/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,7 @@ impl StorageExt for Arc<dyn Storage> {
625625

626626
const STORAGE_GET_RETRIES: usize = 5;
627627

628+
#[allow(clippy::blocks_in_conditions)]
628629
#[try_stream(ok = Bytes, error = futures::io::Error)]
629630
async fn stream_object_with_retries(
630631
mut stream: BoxStream<'static, futures::io::Result<Bytes>>,

crates/vector/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ parking_lot = { workspace = true }
2525
pb = { path = "../pb" }
2626
proptest = { workspace = true, optional = true }
2727
proptest-derive = { workspace = true, optional = true }
28+
qdrant_common = { workspace = true }
2829
qdrant_segment = { workspace = true }
2930
rand = { workspace = true }
30-
rocksdb = { version = "0.21.0", default-features = false, features = [ "snappy" ] }
31+
rocksdb = { version = "0.22.0", default-features = false, features = [ "snappy" ] }
3132
serde = { workspace = true }
3233
serde_json = { workspace = true }
3334
storage = { path = "../storage" }

crates/vector/src/id_tracker.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,19 @@ use byteorder::{
2222
WriteBytesExt,
2323
};
2424
use csf::ls::Map as CsfMap;
25+
use qdrant_common::types::PointOffsetType;
2526
use qdrant_segment::{
26-
common::Flusher,
27-
entry::entry_point::{
28-
OperationError,
29-
OperationResult,
27+
common::{
28+
operation_error::{
29+
OperationError,
30+
OperationResult,
31+
},
32+
Flusher,
3033
},
3134
id_tracker::IdTracker,
3235
types::{
3336
ExtendedPointId,
3437
PointIdType,
35-
PointOffsetType,
3638
SeqNumberType,
3739
},
3840
};

crates/vector/src/lib.rs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ use common::{
1515
types::IndexName,
1616
};
1717
use errors::ErrorMetadata;
18-
use qdrant_segment::data_types::vectors::QueryVector;
18+
use qdrant_segment::data_types::vectors::{
19+
QueryVector,
20+
Vector,
21+
};
1922
use value::FieldPath;
2023

2124
pub mod id_tracker;
@@ -64,15 +67,19 @@ pub const DEFAULT_VECTOR_LIMIT: u32 = 10;
6467
pub const MAX_FILTER_LENGTH: usize = 64;
6568

6669
#[derive(Clone, Debug)]
67-
pub struct IndexedVector(QueryVector);
70+
pub struct IndexedVector(Vec<f32>);
71+
72+
impl From<IndexedVector> for QueryVector {
73+
fn from(value: IndexedVector) -> Self {
74+
QueryVector::Nearest(Vector::Dense(value.0))
75+
}
76+
}
6877

6978
impl Deref for IndexedVector {
7079
type Target = [f32];
7180

7281
fn deref(&self) -> &Self::Target {
73-
match self.0 {
74-
QueryVector::Nearest(ref vec) => &vec[..],
75-
}
82+
&self.0
7683
}
7784
}
7885

@@ -84,15 +91,13 @@ impl TryFrom<Vec<f32>> for IndexedVector {
8491
value.len() <= MAX_VECTOR_DIMENSIONS as usize,
8592
vector_dimensions_mismatch_error(value.len() as u32, MAX_VECTOR_DIMENSIONS)
8693
);
87-
Ok(IndexedVector(QueryVector::Nearest(value)))
94+
Ok(IndexedVector(value))
8895
}
8996
}
9097

9198
impl From<IndexedVector> for Vec<f32> {
9299
fn from(value: IndexedVector) -> Self {
93-
match value.0 {
94-
QueryVector::Nearest(vec) => vec,
95-
}
100+
value.0
96101
}
97102
}
98103

0 commit comments

Comments
 (0)