Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,004 changes: 1,132 additions & 872 deletions quickwit/Cargo.lock

Large diffs are not rendered by default.

54 changes: 30 additions & 24 deletions quickwit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ base64 = "0.22"
binggan = { version = "0.14" }
bytes = { version = "1", features = ["serde"] }
bytesize = { version = "1.3.0", features = ["serde"] }
bytestring = "1.3.0"
bytestring = "1.4"
chitchat = { git = "https://github.com/quickwit-oss/chitchat.git", rev = "54cbc70" }
chrono = { version = "0.4", default-features = false, features = [
"clock",
"std",
] }
clap = { version = "4.5.0", features = ["env", "string"] }
coarsetime = "0.1.33"
colored = "2.1.0"
colored = "2.2"
console-subscriber = "0.1.8"
criterion = { version = "0.5", features = ["async_tokio"] }
cron = "0.12.0"
Expand All @@ -117,12 +117,12 @@ google-cloud-auth = "0.12.0"
google-cloud-gax = "0.15.0"
google-cloud-googleapis = { version = "0.10.0", features = ["pubsub"] }
google-cloud-pubsub = "0.18.0"
heck = "0.4.1"
heck = "0.5"
hex = "0.4.3"
home = "0.5.4"
hostname = "0.3"
http = "0.2.9"
http-serde = "1.1.2"
hostname = "0.4"
http = "0.2"
http-serde = "1.1"
humantime = "2.1.0"
hyper = { version = "0.14", features = [
"client",
Expand All @@ -133,9 +133,9 @@ hyper = { version = "0.14", features = [
"tcp",
] }
hyper-rustls = "0.24"
indexmap = { version = "2.1.0", features = ["serde"] }
indexmap = { version = "2.7", features = ["serde"] }
indicatif = "0.17.3"
itertools = "0.13"
itertools = "0.14"
json_comments = "0.2"
libz-sys = "1.1.8"
lru = "0.12"
Expand Down Expand Up @@ -168,7 +168,7 @@ ouroboros = "0.18.0"
percent-encoding = "2.3.1"
pin-project = "1.1.0"
pnet = { version = "0.33.0", features = ["std"] }
postcard = { version = "1.0.4", features = [
postcard = { version = "1.1", features = [
"use-std",
], default-features = false }
predicates = "3"
Expand All @@ -177,19 +177,19 @@ pprof = { version = "0.13", features = ["flamegraph"] }
proc-macro2 = "1.0.50"
prometheus = { version = "0.13", features = ["process"] }
proptest = "1"
prost = { version = "0.11.6", default-features = false, features = [
prost = { version = "0.12", default-features = false, features = [
"prost-derive",
] }
prost-build = "0.11.6"
prost-types = "0.11.6"
prost-build = "0.12"
prost-types = "0.12"
pulsar = { version = "6.3", default-features = false, features = [
"auth-oauth2",
"compression",
"tokio-runtime",
] }
quote = "1.0.23"
rand = "0.8"
rand_distr = "0.4"
rand = "0.9"
rand_distr = "0.5"
rayon = "1.10"
rdkafka = { version = "0.33", default-features = false, features = [
"cmake-build",
Expand Down Expand Up @@ -219,8 +219,8 @@ serde_json_borrow = "0.5"
serde_qs = { version = "0.12", features = ["warp"] }
serde_with = "3.9.0"
serde_yaml = "0.9"
serial_test = { version = "3.1.1", features = ["file_locks"] }
siphasher = "0.3"
serial_test = { version = "3.2", features = ["file_locks"] }
siphasher = "1"
smallvec = "1"
sqlx = { version = "0.7", features = [
"migrate",
Expand All @@ -229,24 +229,27 @@ sqlx = { version = "0.7", features = [
"time",
] }
syn = { version = "2.0.11", features = ["extra-traits", "full", "parsing"] }
sync_wrapper = "0.1.2"
sync_wrapper = "1.0.2"
sysinfo = "0.33.1"
tabled = { version = "0.14", features = ["color"] }
tempfile = "3"
thiserror = "1"
thiserror = "2"
thousands = "0.2.0"
tikv-jemalloc-ctl = "0.5"
tikv-jemallocator = "0.5"
time = { version = "0.3", features = ["std", "formatting", "macros"] }
tokio = { version = "1.40", features = ["full"] }
tokio = { version = "1.42", features = ["full"] }
tokio-metrics = { version = "0.3.1", features = ["rt"] }
tokio-rustls = { version = "0.24.0", default-features = false }
tokio-stream = { version = "0.1", features = ["sync"] }
tokio-util = { version = "0.7", features = ["full"] }
toml = "0.7.6"
tonic = { version = "0.9.0", features = ["gzip"] }
tonic-build = "0.9.0"
tonic-reflection = "0.9"
# toml = "0.7.6"
# tonic = { version = "0.9.0", features = ["gzip"] }
# tonic-build = "0.9.0"
tonic-reflection = "0.11"
toml = "0.8"
tonic = { version = "0.11", features = ["gzip"] }
tonic-build = "0.11"
tower = { version = "0.4.13", features = [
"balance",
"buffer",
Expand All @@ -272,7 +275,7 @@ typetag = "0.2"
ulid = "1.1"
username = "0.2"
utoipa = { version = "4.2", features = ["time", "ulid"] }
uuid = { version = "1.10", features = ["v4", "serde"] }
uuid = { version = "1.12", features = ["v4", "serde"] }
vrl = { version = "0.19", default-features = false, features = [
"compiler",
"diagnostic",
Expand All @@ -288,6 +291,9 @@ aws-config = "1.5.4"
aws-credential-types = { version = "1.2", features = ["hardcoded-credentials"] }
aws-runtime = "1.3.1"
aws-sdk-kinesis = "1.37"
# Fixing the version of aws-sdk-s3 as they introduced a breaking changed associated with checksum
# computation.
# Details here https://xuanwo.io/links/2025/02/aws_s3_sdk_breaks_its_compatible_services/
aws-sdk-s3 = "=1.62"
aws-sdk-sqs = "1.36"
aws-smithy-async = "1.2"
Expand Down
4 changes: 3 additions & 1 deletion quickwit/quickwit-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ fn register_build_info_metric() {

async fn main_impl() -> anyhow::Result<()> {
#[cfg(feature = "openssl-support")]
openssl_probe::init_ssl_cert_env_vars();
unsafe {
openssl_probe::init_openssl_env_vars()
};
register_build_info_metric();

let about_text = about_text();
Expand Down
8 changes: 4 additions & 4 deletions quickwit/quickwit-cluster/src/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ mod tests {
use quickwit_config::service::QuickwitService;
use quickwit_proto::indexing::IndexingTask;
use quickwit_proto::types::IndexUid;
use rand::Rng;
use rand::Rng as _;

use super::*;

Expand Down Expand Up @@ -1030,12 +1030,12 @@ mod tests {
.await
.unwrap(),
);
let mut random_generator = rand::thread_rng();
let mut random_generator = rand::rng();
// TODO: increase it back to 1000 when https://github.com/quickwit-oss/chitchat/issues/81 is fixed
let indexing_tasks = (0..500)
.map(|pipeline_id| {
let index_id = random_generator.gen_range(0..=10_000);
let source_id = random_generator.gen_range(0..=100);
let index_id = random_generator.random_range(0..=10_000);
let source_id = random_generator.random_range(0..=100);
IndexingTask {
pipeline_uid: Some(PipelineUid::for_test(pipeline_id as u128)),
index_uid: Some(
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-cluster/src/grpc_gossip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ fn select_gossip_candidates(
find_gossip_candidate_grpc_addr(self_chitchat_id, node_state)
.map(|grpc_addr| (&node_state.chitchat_id().node_id, grpc_addr))
})
.choose_multiple(&mut rand::thread_rng(), MAX_GOSSIP_PEERS)
.choose_multiple(&mut rand::rng(), MAX_GOSSIP_PEERS)
.into_iter()
.map(|(node_id, grpc_addr)| (node_id.clone(), grpc_addr))
.unzip()
Expand Down
15 changes: 11 additions & 4 deletions quickwit/quickwit-codegen/example/src/codegen/hello.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions quickwit/quickwit-common/src/coolid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use rand::distributions::Alphanumeric;
use rand::distr::Alphanumeric;
use rand::prelude::*;

const ADJECTIVES: &[&str] = &[
Expand Down Expand Up @@ -84,8 +84,8 @@ const ADJECTIVES: &[&str] = &[

/// Returns a randomly generated id
pub fn new_coolid(name: &str) -> String {
let mut rng = rand::thread_rng();
let adjective = ADJECTIVES[rng.gen_range(0..ADJECTIVES.len())];
let mut rng = rand::rng();
let adjective = ADJECTIVES[rng.random_range(0..ADJECTIVES.len())];
let slug: String = rng
.sample_iter(&Alphanumeric)
.take(4)
Expand Down
5 changes: 1 addition & 4 deletions quickwit/quickwit-common/src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,7 @@ impl HostAddr {
(host_addr, default_port)
};
if !is_valid_hostname(hostname) {
bail!(
"failed to parse address `{}`: hostname is invalid",
host_addr
)
bail!("failed to parse address `{host_addr}`: hostname is invalid")
}
Ok(Self {
host: Host::Hostname(hostname.to_string()),
Expand Down
4 changes: 2 additions & 2 deletions quickwit/quickwit-common/src/rand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use rand::distributions::Alphanumeric;
use rand::distr::Alphanumeric;
use rand::Rng;

/// Appends a random suffix composed of a hyphen and five random alphanumeric characters.
pub fn append_random_suffix(string: &str) -> String {
let rng = rand::thread_rng();
let rng = rand::rng();
let mut randomized_string = String::with_capacity(string.len() + 6);
randomized_string.push_str(string);
randomized_string.push('-');
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-common/src/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl RetryParams {
let capped_delay_ms = delay_ms.min(self.max_delay.as_millis() as u64);
let half_delay_ms = (capped_delay_ms + 1) / 2;
let jitter_range = half_delay_ms..capped_delay_ms + 1;
let jittered_delay_ms = rand::thread_rng().gen_range(jitter_range);
let jittered_delay_ms = rand::rng().random_range(jitter_range);
Duration::from_millis(jittered_delay_ms)
}

Expand Down
25 changes: 13 additions & 12 deletions quickwit/quickwit-common/src/temp_dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,17 +335,17 @@ mod tests {

#[test]
fn test_prefix_random() {
let mut rng = rand::thread_rng();
let mut rng = rand::rng();
let template = "A".repeat(100);
for _ in 0..10000 {
let rand_bytes = rng.gen::<usize>() % 4;
let parts_num = rng.gen::<usize>() % 10;
let rand_bytes = rng.random::<u32>() % 4;
let parts_num = rng.random::<u32>() % 10;
let mut builder = Builder::default();
builder.rand_bytes(rand_bytes);
builder.rand_bytes(rand_bytes as usize);
let mut max_size = 0;
for _ in 0..parts_num {
let size = 1 + rand::random::<usize>() % 10;
builder.join(&template[0..size]);
let size = 1 + rand::random::<u32>() % 10;
builder.join(&template[0..size as usize]);
max_size += size + 1;
}
let separator_count = if rand_bytes > 0 {
Expand All @@ -360,20 +360,21 @@ mod tests {
}
};
let limit_threshold = parts_num + separator_count + rand_bytes;
if parts_num > 0 && rng.gen::<bool>() {
builder.max_length(rand::random::<usize>() % limit_threshold);
if parts_num > 0 && rng.random::<bool>() {
let max_len = (rand::random::<u32>() % limit_threshold) as usize;
builder.max_length(max_len);
assert_eq!(
"the filename limit is too small",
builder.prefix().unwrap_err().to_string()
);
} else {
let len = limit_threshold + rand::random::<usize>() % 100;
builder.max_length(len);
let builder_debug = format!("{:?}, len {}", builder, len);
let max_len = (limit_threshold + rand::random::<u32>() % 100) as usize;
builder.max_length(max_len);
let builder_debug = format!("{:?}, len {}", builder, max_len);
let builder_prefix = builder.prefix().unwrap();
assert_eq!(
builder_prefix.len(),
cmp::min(len - rand_bytes, max_size),
cmp::min(max_len - rand_bytes as usize, max_size as usize),
"{} -> {}",
builder_debug,
builder_prefix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ mod tests {
use itertools::Itertools;
use quickwit_proto::indexing::{mcpu, CpuCapacity, IndexingTask};
use quickwit_proto::types::{IndexUid, NodeId, PipelineUid, ShardId, SourceUid};
use rand::seq::SliceRandom;
use rand::seq::IndexedRandom;

use super::{
build_physical_indexing_plan,
Expand Down Expand Up @@ -873,7 +873,7 @@ mod tests {
for indexer in &indexers {
indexer_id_to_cpu_capacities.insert(indexer.as_str().to_string(), mcpu(16_000));
}
let mut rng = rand::thread_rng();
let mut rng = rand::rng();

let mut shard_locations = ShardLocations::default();
for shard_id in &shard_ids {
Expand Down
Loading