Escaping issue with tag values
还没有人认领这个 Issue。
- #720 来自 @oliverrahner —— 已关闭,未合并
评估
调研方向
从 client.getWriteApiBlocking().writeMeasurements(...) 开始,使用仅包含一个反斜杠的 tag 值,后面再跟随另一个 tag,复现该失败。跟踪该 measurement 在发送请求之前是如何序列化的,然后验证生成的 record 能被 InfluxDB 接受,并为此情况添加覆盖测试。
由索引模型根据 Issue 内容生成。
描述
This issue occurs in our case because a user has entered specific meta data fields as just \.
According to the Influx docs, \ does not need to be escaped, but may be.
In our case, however, the backslash is followed with a comma, because it is at the end of the tag value, followed by another tag value, leading to messed up interpretation of the whole record.
In my opinion, the safest way to handle this is to always escape backslashes.
Steps to reproduce:
List the minimal actions needed to reproduce the behavior.
- Create as
List<>with at least one tag containing just a backslash\ - Write this list to InfluxDB using
client.getWriteApiBlocking().writeMeasurements(WriteParameters.DEFAULT_WRITE_PRECISION, myList);
Expected behavior:
Data would be inserted correctly.
Actual behavior:
Influx returns:
HTTP status code: 400; Message: unable to parse 'metrics,account.companyName=\,account.contactCity=\ [...]
Specifications:
- Client Version: 6.7.0
- InfluxDB Version: 3.7
- JDK Version: 17
- Platform: Linux/Docker/openjdk:17-alpine
- 主要语言
- Java
- 星标
- 477
- 派生
- 129
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
influxdata/influxdb-client-java 的其他 Issue
-
mTLS Support (Client Certificates)可能已有人在做 @NguyenHoangSon96 于 14 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 52/100
-
难度 4/5 3-5 天 新手友好度 45/100
influxdata/influxdb-client-java#849 · 4 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 3/5 1-2 天 新手友好度 35/100
influxdata/influxdb-client-java#830 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 38/100
查看 influxdata/influxdb-client-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
quelea-projection/Quelea#711 ·
-
bug pdd
难度 2/5 1 小时以内 新手友好度 67/100
objectionary/eo#9450 ·
维护者通常 1 天内回复
-
[EC2] DescribeAvailabilityZones should return real AWS error for unknown zone name可能已有人在做 @omatheusmesmo 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
area: core good first issue type: enhancement
难度 2/5 1-3 小时 新手友好度 68/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 78/100
ShaftHQ/SHAFT_ENGINE#6909 ·
维护者通常 1 天内回复