make locking more fine-grained on client close#14027
Merged
fearful-symmetry merged 4 commits intoelastic:feature/dockerbeatfrom Oct 15, 2019
Merged
make locking more fine-grained on client close#14027fearful-symmetry merged 4 commits intoelastic:feature/dockerbeatfrom
fearful-symmetry merged 4 commits intoelastic:feature/dockerbeatfrom
Conversation
26 tasks
sayden
reviewed
Oct 12, 2019
sayden
reviewed
Oct 12, 2019
sayden
suggested changes
Oct 12, 2019
Contributor
sayden
left a comment
There was a problem hiding this comment.
I left a comment about potential problem. Blocking this until you can check it 👍
Contributor
Author
|
@sayden fixed! |
6b6620d to
f3b612b
Compare
urso
reviewed
Oct 15, 2019
| if err != nil { | ||
| return nil, errors.Wrap(err, "error loading pipeline") | ||
| } | ||
| pm.registerPipeline(pipeline, hashstring) |
There was a problem hiding this comment.
This pattern looks like a race, potentially creating zombie-pipelines. At least the if block should be protected and there should be another check (similar to double-checked locking pattern).
Does docker synchronize API calls on logging plugins? In this case we might be safe here.
|
What happened to the notice file? Given the change itself I wonder why we need to update it in this PR. |
fearful-symmetry
added a commit
to fearful-symmetry/beats
that referenced
this pull request
Nov 1, 2019
* make locking more fine-grained on client close
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
* make locking more fine-grained on client close
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.
This came out of a discussion with @urso -- Client and pipeline close operations on libbeat can block depending on
WaitCloseand other settings. We could potentially block other client start operations while the pipelines drained. This attempts to make the locking more fine-grained so we don't hold a mutex while queues drain.