influxdata / influxdata/influxdb1-client
uint64 returns invalid number from Influx v1.8
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 192
- Forks
- 109
- PR merge metrics
- No merged PRs in 30d
Description
Marshaling a field with type uint64 will trigger an "invalid number" error.
This seems to come from these lines: https://github.com/influxdata/influxdb1-client/blob/master/models/points.go#L2354-L2356
A solution would be to cast this to int64 similarly to the cases underneath it.
Additional information
Shell log:
> INSERT convert,hostname=hanaharu wrote_bytes=2363546 1593054632437
> INSERT convert,hostname=hanaharu wrote_bytes=2363546u 1593054632437
ERR: {"error":"unable to parse 'convert,hostname=hanaharu wrote_bytes=2363546u 1593054632437': invalid number"}
InfluxDB v1.8 Data Types for the line protocol reference, which doesn't show unsigned types.

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in models/points.go at the lines linked in the issue and compare uint64 handling with the cases immediately below. Reproduce the shell example or a comparable uint64 marshal, then confirm the resulting line protocol is accepted by InfluxDB v1.8 without an invalid-number error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100