DescriptionJaroslav Henner
2020-01-02 13:58:44 UTC
Description of problem:
There are two problems:
When setting the memory threshold of worker on the Worker tab to not-integral value of GB, the value in the Advanced config is then not exactly right.
As can be guessed, some attempt was made to use GiB, but then it is incorrect to use the GB suffix and the value is computed wrong for certain inputs (note the 1124 and 1224) in the actual behaviour.
The actual behaviour:
Worker tab | actual advanced config value | expected (if GiB is meant)
1.1 GB | 1178599424 = 1124 * 1024**2 | 1181116006.4 = 1.1 * 1024**3
1.2 GB | 1283457024 = 1224 * 1024**2 | 1288490188.8 = 1.2 * 1024**3
Version-Release number of selected component (if applicable):
Version 5.10.13.1.20191125212409_31d9a94
How reproducible:
3/3
Steps to Reproduce:
1. Set the value in the workers tab to not an integral value of GB
2. Observe the value of the threshold of the worker in the advanced tab
3.
Actual results:
the advanced tab contains wrongly computed value
Expected results:
If the Worker tab value suffix is GiB. Then the advanced tab should contain the value * 1024**3
If the Worker tab value suffix is MiB. Then the advanced tab should contain the value * 1024**2
Additional info:
https://en.wikipedia.org/wiki/Gibibyte
confirmed that Issue exists in 5.10 - :memory_threshold: incorrectly converted to bytes before savings
latest master and 5.11 do not have reported issue, :memory_threshold: settings for all workers saved as shown on UI
Example: 1.1 GB shown on UI saved as 1.1.gigabytes