(4) Yesterday we talked about vch_get_new_chunk_slot_count() and the fact that comments above the calls to it are a bit outdated. Would you like to improve that?
Andris Zeila the new chunk slot count calculations are improved. RESOLVED in r40792
Aleksandrs Saveljevs A better place for zbx_isqrt32() function is probably together with is_prime() and next_prime(), in include/zbxalgo.h and src/libs/zbxalgo/algodefs.c. When moving it, please correct its name (add "32") in the comment. You might also wish to consider returning "int" instead of "zbx_uint64_t" - that is natural, considering that argument is "int" and the result is not greater than the argument.
Aleksandrs Saveljevs This functions also fails unit tests. For instance, zbx_isqrt32(8) returns 3, whereas I would expect it to return 2 (i.e., given N return largest integer R such that R^2 <= N). Also, the function uses a non-straightforward algorithm, so it would be nice to describe the algorithm or link to the source. REOPENED.
Andris Zeila Fixed and moved zbx_isqrt32() (along with int128 functions) to zbxalgo.
RESOLVED in r40852
Aleksandrs Saveljevs Thank you! CLOSED.