Transaction timeouts are specified in seconds as float. However, the server expects it in milliseconds as int. This would lead to
1) rounding issues: previously, the driver would multiply by 1000 and
then truncate to int. E.g., 256.4 seconds would be turned into 256399 ms
because of float imprecision.
Therefore, the built-in round is now used instead.
2) values below 1 ms (e.g., 0.0001) would be rounded down to 0. However, 0 is
a special value that instructs the server to not apply any timeout. This
is likely to surprise the user which specified a non-zero timeout. In this
special case, the driver now rounds up to 1 ms.
Transaction timeouts are specified in seconds as float. However, the server expects it in milliseconds as int. This would lead to
1) rounding issues: previously, the driver would multiply by 1000 and then truncate to int. E.g., 256.4 seconds would be turned into 256399 ms because of float imprecision. Therefore, the built-in
round
is now used instead. 2) values below 1 ms (e.g., 0.0001) would be rounded down to 0. However, 0 is a special value that instructs the server to not apply any timeout. This is likely to surprise the user which specified a non-zero timeout. In this special case, the driver now rounds up to 1 ms.Back-port of: https://github.com/neo4j/neo4j-python-driver/pull/940