Skip to content

Commit 1967b6c

Browse files
committed
Avoid blocking in the PartitionProcessorManager when being in the control loop
Summary: - Improve tracing of ControlProcessors commands - Run the spawn of partition processors concurrently
1 parent 95ec9e1 commit 1967b6c

File tree

3 files changed

+149
-88
lines changed

3 files changed

+149
-88
lines changed

crates/core/src/metadata/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use std::sync::{Arc, OnceLock};
1818
use arc_swap::{ArcSwap, AsRaw};
1919
use enum_map::EnumMap;
2020
use tokio::sync::{mpsc, oneshot, watch};
21+
use tracing::instrument;
2122

2223
use restate_types::live::{Live, Pinned};
2324
use restate_types::logs::metadata::Logs;
@@ -175,6 +176,7 @@ impl Metadata {
175176
}
176177

177178
/// Returns when the metadata kind is at the provided version (or newer)
179+
#[instrument(level = "debug", skip(self))]
178180
pub async fn wait_for_version(
179181
&self,
180182
metadata_kind: MetadataKind,

crates/types/src/cluster/cluster_state.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ pub struct DeadNode {
9797
pub last_seen_alive: Option<MillisSinceEpoch>,
9898
}
9999

100-
#[derive(Debug, Clone, Copy, Serialize, Deserialize, Eq, PartialEq, IntoProto)]
100+
#[derive(
101+
Debug, Clone, Copy, Serialize, Deserialize, Eq, PartialEq, IntoProto, derive_more::Display,
102+
)]
101103
#[proto(target = "crate::protobuf::cluster::RunMode")]
102104
pub enum RunMode {
103105
Leader,

0 commit comments

Comments
 (0)