-
Notifications
You must be signed in to change notification settings - Fork 812
Return multiple errors from Writer.WriteMessages and MessageTooLargeError handling improvements #401
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
Closed
Closed
Return multiple errors from Writer.WriteMessages and MessageTooLargeError handling improvements #401
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
62bb464
Export WriterError struct type and associated fields.
Evanjt1 046b6b6
Relocate WriterError so it is grouped with other exported types in wr…
Evanjt1 46fffc3
Fix bug in writer.write where messages were being sent to the incorre…
Evanjt1 adc009d
Add id field to writerMessage struct type.
Evanjt1 7aa5503
Set id when creating writerMessages struct in writer.WriteMessages.
Evanjt1 426ab01
Add writerResponse struct type to wrap write errors with message id.
Evanjt1 d6aaf60
Return writerResponse in fakeWriter.messages() in writer_test.
Evanjt1 0891d29
Add test for kafka 2.2.1 compatibility to circle ci config.
Evanjt1 0bd6dc0
Remove unused WriterError.Cause method
Evanjt1 4963dac
Add WriterErrors type to wrap a slice of WriterError
Evanjt1 67b360e
Change err type in writerResponse to *WriterError
Evanjt1 d5ef30b
Return multiple errors from Writer.WriteMessages and try entire batch…
Evanjt1 427f1ed
Rename receiver in WriterErrors.Error method
Evanjt1 4a268bb
Add writerTestCase type which provides common methods for Writer tests
Evanjt1 407ea25
Update tests for Writer type
Evanjt1 9e8274a
Fix race condition by making testRetryWriter type thread safe
Evanjt1 0876ebf
Add Unwrap method to WriterError type.
Evanjt1 187a291
Merge remote-tracking branch 'upstream/master' into writer-return-errors
Evanjt1 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
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
Could we have the
WriterError
andWriterErrors
type implementerrors.Wrapper
?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.
Will do,
Unwrap()
is straightforward forWriterError
. Do you have thoughts on behavior forWriterErrors
?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.
@achille-roussel For
WriterErrors.Unwrap()
how do you feel about using the same strategy as https://github.com/prometheus/client_golang/blob/82ce871c27ca8919bcdb97d69bcf461499171b27/prometheus/registry.go#L240?