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

Allow retention policy to be specified for write #34

Merged
merged 1 commit into from
Mar 8, 2017

Conversation

duff
Copy link
Contributor

@duff duff commented Mar 2, 2017

According to the InfluxDB docs, when writing, the retention policy can
be specified with a URL parameter named rp:

https://docs.influxdata.com/influxdb/v1.2/guides/writing_data/#writing-data-using-the-http-api

I was thinking that perhaps the retention policy name could be specified
in the Series definition. Then multiple points could be written, each
of which could have its own retention policy. In communicating with
Influx support, I heard back this:

"There is currently no way to specify the database or retention policy
directly in the point at this time. Although a per-point retention
policy option is already a proposed feature for the next version of the
line protocol format."

So, we can specify the retention policy name as an option to the write
function alongside other options like precision.

According to the InfluxDB docs, when writing, the retention policy can
be specified with a URL parameter named `rp`:

https://docs.influxdata.com/influxdb/v1.2/guides/writing_data/#writing-data-using-the-http-api

I was thinking that perhaps the retention policy name could be specified
in the Series definition.  Then multiple points could be written, each
of which could have its own retention policy. In communicating with
Influx support, I heard back this:

"There is currently no way to specify the database or retention policy
directly in the point at this time. Although a per-point retention
policy option is already a proposed feature for the next version of the
line protocol format."

So, we can specify the retention policy name as an option to the `write`
function alongside other options like `precision`.
@coveralls
Copy link

coveralls commented Mar 2, 2017

Coverage Status

Coverage decreased (-1.2%) to 97.619% when pulling b636022 on duff:specify_write_retention_policy into 0f64346 on mneudert:master.

@duff
Copy link
Contributor Author

duff commented Mar 2, 2017

It looks like some of the Travis runs worked and some failed. The failed ones look to me at least as errors on Travis itself. I think. 😄

@mneudert
Copy link
Owner

mneudert commented Mar 2, 2017

💛 ❤️ 💙 💚 💜

The travis error is made by the InfluxDB source installation. The used zap library apparently received a force push removing the vendored dependency version. I will most likely bump travis to one of the 1.2.1-rc releases so these errors go away.

And then merge this with perhaps some whitespace changes I would apply myself 👍

(Maybe also a note that this change only targets the default LineWriter. The UDP endpoint after all requires the retention policy to be set in the server's config file.)

@duff
Copy link
Contributor Author

duff commented Mar 2, 2017

Sounds great! I wasn't sure about the UDP side so that's good to know.

It sure is encouraging to see those hearts in an email client, btw. 😺 I wonder if there's a name for that sequence. José hearts? Hearts of Valim?

@mneudert mneudert changed the base branch from master to url-rp March 6, 2017 16:33
@mneudert mneudert merged commit 9ce588a into mneudert:url-rp Mar 8, 2017
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.

3 participants