diff --git a/crates/local-cluster-runner/src/node/mod.rs b/crates/local-cluster-runner/src/node/mod.rs index a0f20cfce..6724c48ef 100644 --- a/crates/local-cluster-runner/src/node/mod.rs +++ b/crates/local-cluster-runner/src/node/mod.rs @@ -183,7 +183,7 @@ impl Node { base_config.metadata_server.kind(), MetadataServerKind::Raft(_) ) { - info!("Setting the metadata server to embedded"); + info!("Setting the metadata server to replicated"); base_config .metadata_server .set_kind(MetadataServerKind::Raft(RaftOptions::default())); diff --git a/crates/types/src/config/common.rs b/crates/types/src/config/common.rs index 935e89d39..e7f58fc29 100644 --- a/crates/types/src/config/common.rs +++ b/crates/types/src/config/common.rs @@ -739,6 +739,8 @@ pub struct TracingOptions { /// /// Specify additional headers you want the system to send to the tracing endpoint (e.g. /// authentication headers). + #[serde(skip_serializing_if = "SerdeableHeaderHashMap::is_empty")] + #[serde(default)] pub tracing_headers: SerdeableHeaderHashMap, } diff --git a/crates/types/src/config/worker.rs b/crates/types/src/config/worker.rs index ef07c6c1d..2b29e7e0b 100644 --- a/crates/types/src/config/worker.rs +++ b/crates/types/src/config/worker.rs @@ -68,6 +68,8 @@ pub struct WorkerOptions { /// /// Snapshots provide a mechanism for safely trimming the log and efficient bootstrapping of new /// worker nodes. + #[serde(skip_serializing_if = "is_default_snapshots_options")] + #[serde(default)] pub snapshots: SnapshotsOptions, } @@ -366,7 +368,7 @@ impl Default for StorageOptions { /// /// Partition store snapshotting settings. #[serde_as] -#[derive(Default, Debug, Clone, Serialize, Deserialize, derive_builder::Builder)] +#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize, derive_builder::Builder)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", schemars(rename = "SnapshotsOptions", default))] #[serde(rename_all = "kebab-case")] @@ -402,6 +404,10 @@ pub struct SnapshotsOptions { pub snapshot_interval_num_records: Option, } +fn is_default_snapshots_options(opts: &SnapshotsOptions) -> bool { + opts == &SnapshotsOptions::default() +} + impl SnapshotsOptions { pub fn snapshots_base_dir(&self) -> PathBuf { super::data_dir("db-snapshots")