-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Assorted small fixes for dogstatsd UDS listener. #33582
base: main
Are you sure you want to change the base?
Conversation
Produce more verbose error message when EOF happens after reading some bytes, but not all, as it indictates connection sync error. Also log all other errors and treat them as fatal.
SCM_CREDENTIALS are always written in full from the start for each read, even if the previous was partial (which shouldn't happen in our case).
Read returns number of bytes read by that one particular call, not the final position in the buffer. Reusing only the previous return value will overwrite previously received data. If reads sufficiently small, number of bytes read may never be equal to expectedPacketLength, causing the loop to never complete.
Uncompressed package size comparisonComparison with ancestor Diff per package
Decision✅ Passed |
Test changes on VMUse this command from test-infra-definitions to manually test this PR changes on a VM: inv aws.create-vm --pipeline-id=54456568 --os-family=ubuntu Note: This applies to commit 78e9185 |
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.
Left one non-blocking question.
|
||
for err := range sync { | ||
require.NoError(t, err) | ||
time.Sleep(10 * time.Millisecond) |
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.
Just a small nit: what's the reason to be adding a sleep here?
What does this PR do?
Fix assorted small issues in dogstatsd uds listener.
Motivation
Improve error reporting and fix potential issues with partial reads from stream socket.
Describe how you validated your changes
New test added to cover the correctness issue with partial read.
Possible Drawbacks / Trade-offs
Additional Notes