-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config set fails if there is entry in config that is integer bigger than 1e6 #3354
Comments
Thats.... annoying |
I will hit it if I set the bloom filter size on storage hosts to 128MiB. |
The reason for it is our trickery with @whyrusleeping @lgierth any idea how to handle it? |
After doing some testing: 2.- 9223372036854775000 > BloomSize value < 9223372036854775295 3.- When BloomSize value > 9223372036854775295 If we use in repo/fsrepo/serialize/serialize.go:
Then the rounding happens between 9223372036854775000 and 9223372036854776000, little gain, but the error message is more in sync with the values since it fails at > 9223372036854776000. Other options could be using RawMessage to delay the resolution of the values until is is used or set, this way each value is independent from each other and only the desired part gets decoded, with some other tradeoffs of course.... The number allowed seems large enough for a Bloom Filter, so not sure a fix is needed here. |
Solution for the bloom filter would be migration for it to be string instead with unit suffix. |
Solution for it also is using custom json decoder and https://golang.org/pkg/encoding/json/#Decoder.UseNumber |
I have
BloomSize
set to 1048576, if I then try to do any config call, exampleI get:
The integer is being transformed into floating point at some point.
The text was updated successfully, but these errors were encountered: