You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Standard JSON unmarshaller parses any number to float64, which causes precision errors when dealing with big integers, but still fitting into 64 bits.
One example is when we receive a JSON insert with 2^54 in it, we'll pass it to Clickhouse with some other value, which seems pretty unacceptable on production. (We have commented out test for that, look https://github.com/QuesmaOrg/poc-elk-mitmproxy/pull/269 )
It would probably also be good to check/grep other places in code, as we're using the standard unmarshaller in more than one place.
The text was updated successfully, but these errors were encountered:
trzysiek
changed the title
Parse integers as integers, not float64
Parse integers to ints, not float64Feb 16, 2024
Standard JSON unmarshaller parses any number to
float64
, which causes precision errors when dealing with big integers, but still fitting into 64 bits.One example is when we receive a JSON insert with 2^54 in it, we'll pass it to Clickhouse with some other value, which seems pretty unacceptable on production. (We have commented out test for that, look https://github.com/QuesmaOrg/poc-elk-mitmproxy/pull/269 )
It would probably also be good to check/grep other places in code, as we're using the standard unmarshaller in more than one place.
The text was updated successfully, but these errors were encountered: