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

split metrics based on UDPPayload size #2795

Merged
merged 1 commit into from
May 12, 2017

Conversation

sebito91
Copy link
Contributor

@sebito91 sebito91 commented May 12, 2017

Required for all PRs:

  • CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)
  • Sign CLA (if not already signed)

Issue Description

Without this fix, metric streams would send data blindly up to the max size of the UDPPayload buffer without processing newline and/or timestamps. This would result in malformed packets being processed at the DB entry point causing either partial writes or complete failed points.

The patch here splits the measurements up to a max size of the UDPPayload value with enough room to add both the newline and timestamp information. This results in more packets being sent, but ensures the payload will be properly formatted for receipt at the DB entry point.

@danielnelson
Copy link
Contributor

My only concern is that we will also be doing the splitting with the http client as well. I'll try to move the conversion from telegraf.Metric to []bytes into the Client interface.

@sebito91
Copy link
Contributor Author

sebito91 commented May 12, 2017 via email

@danielnelson
Copy link
Contributor

Changing the Client interface is going to be too big of a change for 1.3, so I think we should add a field to the InfluxDB struct called splitPayload that is true if there is at least one udp clients. Then we split the metrics if that is true.

@sebito91
Copy link
Contributor Author

sebito91 commented May 12, 2017 via email

@danielnelson
Copy link
Contributor

This fix should go in 1.3.0, so I'll merge this now, add the splitPayload bit and create rc4 today.

@danielnelson danielnelson merged commit b16eb6e into influxdata:release-1.3 May 12, 2017
danielnelson added a commit that referenced this pull request May 12, 2017
@danielnelson danielnelson added this to the 1.3.0 milestone May 12, 2017
vlamug pushed a commit to vlamug/telegraf that referenced this pull request May 30, 2017
jeichorn pushed a commit to jeichorn/telegraf that referenced this pull request Jul 24, 2017
nevins-b pushed a commit to nevins-b/telegraf that referenced this pull request Aug 23, 2017
maxunt pushed a commit that referenced this pull request Jun 26, 2018
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.

2 participants