Skip to content

Commit 842abb8

Browse files
committed
Papaya stores are lighter?
1 parent f7db58b commit 842abb8

File tree

17 files changed

+583
-1078
lines changed

17 files changed

+583
-1078
lines changed

ahnlich/client/src/db.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ mod tests {
547547
StoreInfo {
548548
name: StoreName("Main".to_string()),
549549
len: 0,
550-
size_in_bytes: 1720,
550+
size_in_bytes: 1056,
551551
},
552552
]))));
553553
let res = pipeline.exec().await.expect("Could not execute pipeline");
@@ -603,7 +603,7 @@ mod tests {
603603
ServerResponse::StoreList(HashSet::from_iter([StoreInfo {
604604
name: StoreName("Main".to_string()),
605605
len: 2,
606-
size_in_bytes: 2016,
606+
size_in_bytes: 1352,
607607
},]))
608608
);
609609
// error as different dimensions
@@ -628,7 +628,7 @@ mod tests {
628628
ServerResponse::StoreList(HashSet::from_iter([StoreInfo {
629629
name: StoreName("Main".to_string()),
630630
len: 1,
631-
size_in_bytes: 1904,
631+
size_in_bytes: 1240,
632632
},]))
633633
);
634634
}

ahnlich/db/src/engine/store.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1130,12 +1130,12 @@ mod tests {
11301130
StoreInfo {
11311131
name: odd_store,
11321132
len: 2,
1133-
size_in_bytes: 2096,
1133+
size_in_bytes: 1432,
11341134
},
11351135
StoreInfo {
11361136
name: even_store,
11371137
len: 0,
1138-
size_in_bytes: 1744,
1138+
size_in_bytes: 1080,
11391139
},
11401140
])
11411141
)

ahnlich/db/src/server/handler.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ use std::io::Result as IoResult;
2020
use std::net::SocketAddr;
2121
use std::sync::atomic::AtomicBool;
2222
use std::sync::Arc;
23+
use task_manager::Task;
2324
use task_manager::TaskManager;
2425
use task_manager::TaskState;
25-
use task_manager::{BlockingTask, Task};
2626
use tokio::io::BufReader;
2727
use tokio::net::TcpListener;
2828
use tokio::net::TcpStream;

ahnlich/db/src/tests/server_test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ async fn test_create_stores() {
184184
StoreInfo {
185185
name: StoreName("Main".to_string()),
186186
len: 0,
187-
size_in_bytes: 1720,
187+
size_in_bytes: 1056,
188188
},
189189
]))));
190190
let stream = TcpStream::connect(address).await.unwrap();
@@ -1482,7 +1482,7 @@ async fn test_drop_stores() {
14821482
StoreInfo {
14831483
name: StoreName("Main".to_string()),
14841484
len: 0,
1485-
size_in_bytes: 1720,
1485+
size_in_bytes: 1056,
14861486
},
14871487
]))));
14881488
expected.push(Ok(ServerResponse::Del(1)));

ahnlich/grpc_types/src/ai/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
pub mod query;
21
pub mod execution_provider;
32
pub mod models;
3+
pub mod pipeline;
44
pub mod preprocess;
5+
pub mod query;
56
pub mod server;
6-
pub mod pipeline;

ahnlich/grpc_types/src/ai/pipeline.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ pub mod ai_query {
2020
#[prost(message, tag = "4")]
2121
CreatePredIndex(super::super::query::CreatePredIndex),
2222
#[prost(message, tag = "5")]
23-
CreateNonLinearAlgorithmIndex(
24-
super::super::query::CreateNonLinearAlgorithmIndex,
25-
),
23+
CreateNonLinearAlgorithmIndex(super::super::query::CreateNonLinearAlgorithmIndex),
2624
#[prost(message, tag = "6")]
2725
DropPredIndex(super::super::query::DropPredIndex),
2826
#[prost(message, tag = "7")]

ahnlich/grpc_types/src/ai/query.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ pub struct GetSimN {
6363
#[prost(uint32, tag = "4")]
6464
pub closest_n: u32,
6565
/// Algorithm to use for similarity search
66-
#[prost(enumeration = "super::super::algorithm::algorithms::Algorithm", tag = "5")]
66+
#[prost(
67+
enumeration = "super::super::algorithm::algorithms::Algorithm",
68+
tag = "5"
69+
)]
6770
pub algorithm: i32,
6871
/// Preprocessing actions to apply to input before querying
6972
#[prost(enumeration = "super::preprocess::PreprocessAction", tag = "6")]
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pub mod nonlinear;
21
pub mod algorithms;
2+
pub mod nonlinear;

ahnlich/grpc_types/src/db/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
pub mod server;
21
pub mod pipeline;
32
pub mod query;
3+
pub mod server;

ahnlich/grpc_types/src/db/pipeline.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ pub mod db_query {
2222
#[prost(message, tag = "5")]
2323
CreatePredIndex(super::super::query::CreatePredIndex),
2424
#[prost(message, tag = "6")]
25-
CreateNonLinearAlgorithmIndex(
26-
super::super::query::CreateNonLinearAlgorithmIndex,
27-
),
25+
CreateNonLinearAlgorithmIndex(super::super::query::CreateNonLinearAlgorithmIndex),
2826
#[prost(message, tag = "7")]
2927
DropPredIndex(super::super::query::DropPredIndex),
3028
#[prost(message, tag = "8")]

ahnlich/grpc_types/src/db/query.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ pub struct GetSimN {
5858
#[prost(uint64, tag = "3")]
5959
pub closest_n: u64,
6060
/// The algorithm to use for similarity computation.
61-
#[prost(enumeration = "super::super::algorithm::algorithms::Algorithm", tag = "4")]
61+
#[prost(
62+
enumeration = "super::super::algorithm::algorithms::Algorithm",
63+
tag = "4"
64+
)]
6265
pub algorithm: i32,
6366
/// The predicate condition to apply.
6467
#[prost(message, optional, tag = "5")]

ahnlich/grpc_types/src/db/server.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ pub struct CreateIndex {
5454
}
5555
#[derive(Clone, PartialEq, ::prost::Message)]
5656
pub struct ServerResponse {
57-
#[prost(oneof = "server_response::Response", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
57+
#[prost(
58+
oneof = "server_response::Response",
59+
tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
60+
)]
5861
pub response: ::core::option::Option<server_response::Response>,
5962
}
6063
/// Nested message and enum types in `ServerResponse`.

ahnlich/grpc_types/src/keyval.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ pub struct StoreEntry {
3636
#[derive(Clone, PartialEq, ::prost::Message)]
3737
pub struct StoreValue {
3838
#[prost(map = "string, message", tag = "1")]
39-
pub value: ::std::collections::HashMap<
40-
::prost::alloc::string::String,
41-
super::metadata::MetadataValue,
42-
>,
39+
pub value:
40+
::std::collections::HashMap<::prost::alloc::string::String, super::metadata::MetadataValue>,
4341
}
4442
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4543
#[repr(i32)]

ahnlich/grpc_types/src/lib.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
pub mod services;
2-
pub mod metadata;
3-
pub mod client;
4-
pub mod predicates;
5-
pub mod version;
6-
pub mod utils;
71
pub mod ai;
2+
pub mod algorithm;
3+
pub mod client;
84
pub mod db;
9-
pub mod shared;
105
pub mod keyval;
6+
pub mod metadata;
7+
pub mod predicates;
8+
pub mod server_types;
9+
pub mod services;
10+
pub mod shared;
1111
pub mod similarity;
12-
pub mod algorithm;
13-
pub mod server_types;
12+
pub mod utils;
13+
pub mod version;

0 commit comments

Comments
 (0)