-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processor/logstransform]: Fix shutdown ordering leading to panic (#3…
…1153) **Description:** * re-order how we start and stop the different goroutines in the logstransform processor The idea is, we start the goroutines from the consumer end up to the producer end, then shut them down in reverse order. This is similar to how stanza itself starts and stops it's operators, for instance (starts in reverse topological order, stops in topological order). **Link to tracking Issue:** Closes #31139 **Testing:** Added a unit test. This unit test regularly fails on the code on main (panics), but works consistently on this branch (I've run it 100 times to makes sure). ```sh go test -timeout 10m -count=100 -v -run '^TestProcessorShutdownWithSlowOperator$' github.com/open-telemetry/opentelemetry-collector-contrib/processor/logstransformprocessor ```
- Loading branch information
1 parent
7320350
commit a932e91
Showing
3 changed files
with
190 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: bug_fix | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) | ||
component: logstransformprocessor | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Fix potential panic on shutdown due to incorrect shutdown order | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [31139] |
This file contains 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
This file contains 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