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
On further investigation, I observed that its happening while unmarshalling the request body in the http handler.
In ParseHTTPRequest in redisCmdAdapter.go : we are converting the request body to map[string]interface{}
Since the value type is interface{} golang considers the numbers as float which has precision limits upto 15 digits and thus converts it to scientific notation -9.223372036854776e+18 before storing in the DB
The text was updated successfully, but these errors were encountered:
Is this one being worked on? For the solution, should we try converting to string and
use big.Int -> func (z *Int) SetString(s string, base int) (*Int, bool)
bigIntVal := new(big.Int)
if strValue, ok := value.(string); ok {
bigInt, success := bigIntVal.SetString(strValue, 10)
if !success {
return errors.New("Error: Failed to convert string to big.Int")
}
}
Steps to reproduce
Trying to set math.MinInt64
The result of get operation is
Expected output
Observed output
On further investigation, I observed that its happening while unmarshalling the request body in the http handler.
ParseHTTPRequest
inredisCmdAdapter.go
: we are converting the request body tomap[string]interface{}
-9.223372036854776e+18
before storing in the DBThe text was updated successfully, but these errors were encountered: