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

Field mismatch error messages need to be updated #2908

Closed
pauldix opened this issue Jun 11, 2015 · 4 comments
Closed

Field mismatch error messages need to be updated #2908

pauldix opened this issue Jun 11, 2015 · 4 comments
Assignees
Milestone

Comments

@pauldix
Copy link
Member

pauldix commented Jun 11, 2015

After #2885 the write error messages for field type mismatch aren't friend. Like this write failed: field type conflict: input field "value" is type int64, already exists as type %!s(influxql.DataType=1)

Update to convert that data type to a string for more friendly error messages.

@jwilder jwilder added this to the 0.9.1 milestone Jun 11, 2015
@davidbirdsong
Copy link

Could I ask that this error also include the measurement? I'm converting json to line protocol and writing via UDP and having a lot of trouble tracking down problems w/ my converter.

@Jhors2
Copy link

Jhors2 commented Jun 11, 2015

Hey @pauldix
Can you also describe when this happens? it is creating a massive cluster inconsistency that I do not understand (There is only one pusher script always writing value as type int).

@jwilder
Copy link
Contributor

jwilder commented Jun 11, 2015

@Jhors2 It happens when you write a point field as one type initially and write a different type later. For example, if you write cpu value=0, the type will be an integer. If you later write cpu value=0.5, the type written is a float but the field type is an integer so you get this error. If the initial write was cpu value=0.0, the field type would be defined as a float and the second write would succeed.

If you are using the line protocol and writing float data, it needs to always have a decimal in the value. If it's integers, no decimals.

@Jhors2
Copy link

Jhors2 commented Jun 11, 2015

Awesome, thanks!

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

No branches or pull requests

4 participants