-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
transport/bufWriter: fast-fail on error returned from flushKeepBuffer() #7394
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7394 +/- ##
========================================
Coverage 81.42% 81.42%
========================================
Files 348 354 +6
Lines 26744 27083 +339
========================================
+ Hits 21775 22053 +278
- Misses 3779 3817 +38
- Partials 1190 1213 +23
|
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.
Thank you for sending the fix, left some minor comments.
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.
LGTM, adding another reviewer for a second approval.
func (s) TestWriteBadConnection(t *testing.T) { | ||
data := []byte("test_data") | ||
writeBufferSize := (len(data) - 1) / 2 | ||
writer := newBufWriter(&badNetworkConn{}, writeBufferSize, getWriteBufferPool(writeBufferSize)) |
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.
We probably can add a test table, where we create the bufWriter
with and without a shared pool and ensure that the behavior works across both cases.
Also, please respond to individual comments. That helps reviewers to keep track of the individual changes that they requested (and eventually mark them as resolved). Thanks. |
Looks like a bunch of tests are failing. PTAL. |
looking at failed tests |
@veshij any update? |
@dfawley Updated PR with the first option. |
@printchard : FYI |
fixes #7389
RELEASE NOTES:
conn.Write
returns errors