Skip to content

Commit 5eae799

Browse files
authored
Merge branch 'main' into matthew.kim/metrics-wide-schema
2 parents 440631b + 845d9a7 commit 5eae799

11 files changed

Lines changed: 31 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
if: always() && steps.modified.outputs.rust_src == 'true'
144144
run: |
145145
sudo apt-get update
146-
sudo apt-get -y install protobuf-compiler
146+
sudo apt-get -y install protobuf-compiler libcurl4-openssl-dev
147147
- name: Setup nightly Rust Toolchain (for rustfmt)
148148
if: steps.modified.outputs.rust_src == 'true'
149149
uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # master

.github/workflows/coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ jobs:
117117
sudo apt update
118118
sudo apt install libsasl2-dev
119119
sudo apt install libsasl2-2
120+
sudo apt install libcurl4-openssl-dev
120121
121122
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v.6.2.0
122123
with:

quickwit/quickwit-cluster/src/member.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl NodeStateExt for NodeState {
8686
fn ingester_status(&self) -> IngesterStatus {
8787
self.get(INGESTER_STATUS_KEY)
8888
.and_then(IngesterStatus::from_json_str_name)
89-
.unwrap_or_default()
89+
.unwrap_or(IngesterStatus::Ready)
9090
}
9191

9292
fn availability_zone(&self) -> Option<String> {
@@ -221,3 +221,17 @@ fn parse_enabled_services_str(
221221
}
222222
enabled_services
223223
}
224+
225+
#[cfg(test)]
226+
mod tests {
227+
use chitchat::NodeState;
228+
use quickwit_proto::ingest::ingester::IngesterStatus;
229+
230+
use super::NodeStateExt;
231+
232+
#[test]
233+
fn test_ingester_status_defaults_to_ready_when_key_absent() {
234+
let node_state = NodeState::for_test();
235+
assert_eq!(node_state.ingester_status(), IngesterStatus::Ready);
236+
}
237+
}

quickwit/quickwit-proto/src/types/doc_mapping_uid.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ impl prost::Message for DocMappingUid {
9999
)?;
100100
let ulid_bytes: [u8; ULID_SIZE] =
101101
buffer.try_into().map_err(|buffer: Vec<u8>| {
102+
#[allow(deprecated)]
102103
prost::DecodeError::new(format!(
103104
"invalid length for field `doc_mapping_uid`, expected 16 bytes, got {}",
104105
buffer.len()

quickwit/quickwit-proto/src/types/doc_uid.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ impl prost::Message for DocUid {
9898
)?;
9999
let ulid_bytes: [u8; ULID_SIZE] =
100100
buffer.try_into().map_err(|buffer: Vec<u8>| {
101+
#[allow(deprecated)]
101102
prost::DecodeError::new(format!(
102103
"invalid length for field `doc_uid`, expected 16 bytes, got {}",
103104
buffer.len()

quickwit/quickwit-proto/src/types/index_uid.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ impl prost::Message for IndexUid {
137137
)?;
138138
let ulid_bytes: [u8; ULID_SIZE] =
139139
buffer.try_into().map_err(|buffer: Vec<u8>| {
140+
#[allow(deprecated)]
140141
prost::DecodeError::new(format!(
141142
"invalid length for field `incarnation_id`, expected 16 bytes, got {}",
142143
buffer.len()

quickwit/quickwit-proto/src/types/pipeline_uid.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ impl prost::Message for PipelineUid {
102102
)?;
103103
let ulid_bytes: [u8; ULID_SIZE] =
104104
buffer.try_into().map_err(|buffer: Vec<u8>| {
105+
#[allow(deprecated)]
105106
prost::DecodeError::new(format!(
106107
"invalid length for field `pipeline_uid`, expected 16 bytes, got {}",
107108
buffer.len()

quickwit/quickwit-proto/src/types/position.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ impl prost::Message for Position {
273273
error
274274
},
275275
)?;
276+
#[allow(deprecated)]
276277
let byte_string = ByteString::try_from(value)
277278
.map_err(|_| DecodeError::new("position is not valid UTF-8"))?;
278279
*self = Self::from(byte_string);

quickwit/quickwit-proto/src/types/shard_id.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ impl prost::Message for ShardId {
104104
error
105105
},
106106
)?;
107+
#[allow(deprecated)]
107108
let byte_string = ByteString::try_from(value)
108109
.map_err(|_| DecodeError::new("shard_id is not valid UTF-8"))?;
109110
*self = Self(byte_string);

quickwit/quickwit-serve/src/lib.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -679,15 +679,13 @@ pub async fn serve_quickwit(
679679
.context("failed to start searcher service")?;
680680

681681
// The control plane listens for local shards updates to learn about each shard's ingestion
682-
// throughput. Ingesters (routers) do so to update their shard table.
683-
let local_shards_update_listener_handle_opt = if node_config
684-
.is_service_enabled(QuickwitService::ControlPlane)
685-
|| node_config.is_service_enabled(QuickwitService::Indexer)
686-
{
687-
Some(setup_local_shards_update_listener(cluster.clone(), event_broker.clone()).await)
688-
} else {
689-
None
690-
};
682+
// throughput.
683+
let local_shards_update_listener_handle_opt =
684+
if node_config.is_service_enabled(QuickwitService::ControlPlane) {
685+
Some(setup_local_shards_update_listener(cluster.clone(), event_broker.clone()).await)
686+
} else {
687+
None
688+
};
691689

692690
let report_splits_subscription_handle_opt =
693691
// DISCLAIMER: This is quirky here: We base our decision to forward the split report depending

0 commit comments

Comments
 (0)