[libbeat] Cleaning up some unneeded helper types#31290
Merged
Merged
Conversation
Contributor
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Contributor
kvch
approved these changes
Apr 14, 2022
v1v
added a commit
to v1v/beats
that referenced
this pull request
Apr 18, 2022
…er-tar-gz * upstream/main: (139 commits) [Automation] Update elastic stack version to 8.3.0-c655cda8 for testing (elastic#31322) Define a queue metrics reporter interface (elastic#31289) [Oracle Module] Change tablespace metricset collection period (elastic#31259) libbeat/reader/syslog: relax timestamp parsing to allow leading zero (elastic#31254) [Automation] Update elastic stack version to 8.3.0-55ba6f37 for testing (elastic#31311) [libbeat] Remove unused fields and functions in the memory queue (elastic#31302) [libbeat] Cleaning up some unneeded helper types (elastic#31290) Readme for kibana module (elastic#31276) [Automation] Update elastic stack version to 8.3.0-4be61f32 for testing (elastic#31296) x-pack/winlogbeat/module/routing/ingest: fix typo for channel name (elastic#31291) Small pipeline cleanup removing some unused data fields (elastic#31288) removing info log (elastic#30971) Simplify TLS config deserialization (elastic#31168) Detect new files under known paths in filestream input (elastic#31268) Add support for port mapping in docker hints (elastic#31243) Update qa-labels.yml (elastic#31260) libbeat: log debug for `proxy_url` and fixed docs (elastic#31130) [heartbeat][docs] Add note about ensuring correct index settings for uptime (elastic#31146) [Automation] Update elastic stack version to 8.3.0-2c8f9574 for testing (elastic#31256) [Filebeat] fix m365_defender pipeline bug (elastic#31227) ...
kush-elastic
pushed a commit
to kush-elastic/beats
that referenced
this pull request
May 2, 2022
chrisberkhout
pushed a commit
that referenced
this pull request
Jun 1, 2023
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.
What does this PR do?
Merges and simplifies some helper types in the publisher pipeline:
pipelineEventer. The only purpose of this wrapper type was to implement thequeue.ACKListenerinterface forPipeline. However, the values in it were already inPipeline, resulting in duplication of its fields and confusing ownership. The new code just implements theACKListenerinterface directly onPipeline.waitCloser. This type was just a wrapper around a wait group, seemingly to simplify sharing the outstanding event state betweenPipelineandpipelineEventer. However, withpipelineEventergone there's no need for this coordination. I replaced the formerwaitCloserfield with an explicit wait group and removed the now-unused wrapper functions. Code that previously tested whether to report things based on whetherwaitCloserwasnilnow use the more descriptivewaitOnCloseflag which is initialized equivalently.WaitOnClientClosevalue forWaitCloseMode. It caused some confusing checks, but it is unused (both in the sense that nothing refers to it and that there doesn't seem to have been any way to actually use it, since the waiting code was gated exclusively on the (very slightly) more commonWaitOnPipelineClosemode.None of these changes should cause any visible behavior changes in the pipeline.
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature worksI have added an entry inCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.