-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Panic error with inserting values with commas #3013
Comments
@michal800106 I'm not sure I understand the problem. Commas have special syntactical meaning in JSON so it makes sense to me that they would need to be escaped, especially in a nested JSON array like you provide. In any event the JSON protocol is deprecated in favor of the line protocol. |
@beckettsean |
@michal800106 it's a good point that it shouldn't panic. I'll re-open this to make sure that while the JSON protocol code is still around it doesn't panic in this instance. The regression is unfortunate, looks like there was a gap in our test suite related to nested commas in the JSON block. |
I prepared some fix for this error maybe it's not the best but is working. Could you take a look at it? |
@beckettsean Have you looked at my proposition of fix #3043? |
@beckettsean I debug deeper and I made a new commit after rebasing to your master branch. |
Commas and quotes could get escaped and parsed incorrectly if they were both present in a string value. Fixes #3013
I receive panic error when I'm trying to write message with commas in fields value.
I see stacktrace in log (I added some printf to investigate what happens with these values):
I checked that if I escape commas in field as below then influxdb is working properly:
The text was updated successfully, but these errors were encountered: