From 66b6f065c43052a510d8ed7c225c39dab1255277 Mon Sep 17 00:00:00 2001 From: ArunPiduguDD Date: Mon, 20 Jul 2026 14:51:02 -0400 Subject: [PATCH 1/2] fix(topology): consume pending component reloads Consume explicit component reload requests after the next topology reload. Environment: Datadog workspace Co-Authored-By: Pi OpenAI GPT-5 --- changelog.d/pending_component_reloads.fix.md | 3 ++ src/topology/running.rs | 56 +++++++++++++++++--- 2 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 changelog.d/pending_component_reloads.fix.md diff --git a/changelog.d/pending_component_reloads.fix.md b/changelog.d/pending_component_reloads.fix.md new file mode 100644 index 0000000000000..3a5a1d528d77a --- /dev/null +++ b/changelog.d/pending_component_reloads.fix.md @@ -0,0 +1,3 @@ +Prevent components explicitly reloaded once from being unnecessarily restarted during later configuration reloads. + +authors: arunpidugu diff --git a/src/topology/running.rs b/src/topology/running.rs index bc271c8da8b43..708b3840b909e 100644 --- a/src/topology/running.rs +++ b/src/topology/running.rs @@ -106,7 +106,7 @@ impl RunningTopology { /// initializes the pending reload set. pub fn extend_reload_set(&mut self, new_set: HashSet) { match &mut self.pending_reload { - None => self.pending_reload = Some(new_set.clone()), + None => self.pending_reload = Some(new_set), Some(existing) => existing.extend(new_set), } } @@ -297,11 +297,8 @@ impl RunningTopology { // spawning the new version of the component. // // We also shutdown any component that is simply being removed entirely. - let diff = if let Some(components) = &self.pending_reload { - ConfigDiff::new(&self.config, &new_config, components.clone()) - } else { - ConfigDiff::new(&self.config, &new_config, HashSet::new()) - }; + let components_to_reload = self.pending_reload.take().unwrap_or_default(); + let diff = ConfigDiff::new(&self.config, &new_config, components_to_reload); let buffers = self.shutdown_diff(&diff, &new_config).await; // Gives windows some time to make available any port @@ -1435,3 +1432,50 @@ fn get_changed_outputs(diff: &ConfigDiff, output_ids: Inputs) -> Vec Date: Wed, 22 Jul 2026 16:01:22 +0000 Subject: [PATCH 2/2] docs(changelog): clarify component reload impact Explain how repeated component reloads can reset in-memory state. Environment: Datadog workspace Co-Authored-By: Pi OpenAI GPT-5 --- changelog.d/pending_component_reloads.fix.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/pending_component_reloads.fix.md b/changelog.d/pending_component_reloads.fix.md index 3a5a1d528d77a..537b870376d88 100644 --- a/changelog.d/pending_component_reloads.fix.md +++ b/changelog.d/pending_component_reloads.fix.md @@ -1,3 +1,3 @@ -Prevent components explicitly reloaded once from being unnecessarily restarted during later configuration reloads. +Fixes an issue where components selected for an explicit reload remained selected for later configuration reloads. This could unnecessarily restart unchanged components and reset their in-memory state. authors: arunpidugu