Skip to content
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

fix(write): drop empty lines from write batches #20669

Merged
merged 3 commits into from
Feb 2, 2021

Conversation

danxmoran
Copy link
Contributor

Closes #20667

The 2nd commit is unrelated, but useful for having Support test with binaries built from branches.

write/batcher.go Outdated Show resolved Hide resolved
if !cmp.Equal(got, tt.want) {
t.Errorf("%q. Batcher.write() = -got/+want %s", tt.name, cmp.Diff(got, tt.want))
}
require.Equal(t, tt.wantNoCall, !writeCalled)
Copy link
Contributor

@lesam lesam Feb 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: This logic would be a bit prettier if this had been called wantCall

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True! I like wantNoCall because the zero value is the most common case, so we can leave it unspecified in most of the test-case structs & reduce noise.

Copy link
Contributor

@lesam lesam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@danxmoran danxmoran merged commit 591866b into master Feb 2, 2021
@danxmoran danxmoran deleted the dm-influx-write-filter-blank-lines-20667 branch February 2, 2021 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server-side failure when influx write sends blank lines
2 participants