influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

Web interface displays unsinged 64 bit integers wrong

Open mehdisadeghi opened this issue 3 years ago • 1 comments

Steps to reproduce: List the minimal actions needed to reproduce the behavior.

  1. insert a field value with max unsigned integer value, i.e. 2**64 -1 which is 18446744073709551615u
  2. query that using the web interface of InfluxDB 2.1.1 (git: 657e1839de)
  3. _value field would display 18446744073709552000 instead of 18446744073709551615

Expected behavior: The data explorer should display 18446744073709551615

Actual behavior: It displays 18446744073709552000

Environment info:

  • System info: Run uname -srm and copy the output here
  • Linux 5.14.14-arch1-1 x86_64
  • InfluxDB version: Run influxd version and copy the output here
  • InfluxDB 2.1.1 (git: 657e1839de) build_date: 2021-11-09T03:03:48Z
  • Other relevant environment details: Container runtime, disk info, etc

Config: Copy any non-default config values here or attach the full config as a gist or file.

Strong Hypothesis

JavaScript can support unsigned 64 bit integers with BigInt. Without BigInt the result would be:

2**64-1 -> 18446744073709552000

With BigInt it would be:

2n**64n-1n -> 18446744073709551615n

Perhaps that's the culprit. If queried using the influxdb-cli tool yields the correct values.

Edit: added 'u' to the value in step one

mehdisadeghi avatar Nov 16 '21 14:11 mehdisadeghi

Any update on this?

acidos avatar Jun 29 '22 20:06 acidos