-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for closing publisher.Client #1402
Merged
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5fab340
Init support for closing publisher.Client
c153fbf
refactor + fixes in client close
c15d4f8
close canceler done channel
8ce0a6e
force beats to connect to publisher
18be356
topbeat close publisher.Client on stop
d00bf85
Winlogbeat close publisher.client
75abe2b
Packetbeat close publisher client on stop
45f70e9
filebeat publish shutdown
28ef50c
Fix mockbeat
0dd6100
Fix typos
a4b652e
Enforce all clients must have disconnected
f202041
update winlogbeat stopping behavior
e1583ef
clarify filebeat publisher exit on registrar queue
9ccc09d
remove obsolete 'failures' from winlogbeat expvars
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Winlogbeat close publisher.client
- Loading branch information
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I have some incorrect error handling here.
(Making assumptions here because I haven't reviewed everything yet) When the publisher client closes some
PublishEvents()
calls might fail and return false. So I need to return from here to prevent any state from being persisted in the registry for the failed events. WDYT?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, something's fishy here. using 'Sync' + 'Guaranteed'. The only reason for having
ok == false
is the publisher client being closed. That is in main loop we've to break the loop on '!ok'