fix(collector): subscribe to flow-recv actor only when needed for flow-options handler actor - #38
Open
rodonile wants to merge 1 commit into
Open
fix(collector): subscribe to flow-recv actor only when needed for flow-options handler actor#38rodonile wants to merge 1 commit into
rodonile wants to merge 1 commit into
Conversation
rodonile
enabled auto-merge (rebase)
August 13, 2026 11:28
ustorbeck
force-pushed
the
flow-options-fix
branch
from
August 19, 2026 14:00
32d3e37 to
79ad08f
Compare
riccardo-negri
force-pushed
the
flow-options-fix
branch
from
August 20, 2026 07:56
79ad08f to
1d7f559
Compare
riccardo-negri
approved these changes
Aug 20, 2026
Move the extra supervisor.subscribe() call for FlowOptionsActorHandle inside the enrichment input branch instead of creating it unconditionally for every FlowKafkaAvro/FlowKafkaJson publisher. Previously an unused subscription (and its buffered channel) was created even when no flow_options input was configured, wasting memory and adding a needless subscriber to the flow supervisor.
rodonile
force-pushed
the
flow-options-fix
branch
from
August 21, 2026 07:50
1d7f559 to
c949af5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes an unnecessary subscription to the flow supervisor in
init_flow_collection(). For both theFlowKafkaAvroandFlowKafkaJsonpublisher endpoints, a dedicatedsupervisor_handle.subscribe(...)call — meant only to feedFlowOptionsActorHandle— was being created unconditionally,regardless of whether the publisher's enrichment config actually
declared a
flow_optionsinput.This meant every such publisher group registered an extra subscriber
on the flow supervisor and allocated a buffered channel that was
immediately dropped unused whenever
flow_optionswasn't configured.Change
Moved the
subscribe()call inside theif let Some(flow_options_config) = ...branch, so the subscriptionis only created when a
flow_optionsinput is actually configured.Applied to both the
FlowKafkaAvroandFlowKafkaJsoncode paths.