Fix handling of sub-ms transaction timeouts #940
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Transaction timeouts are specified in seconds as float. However, the server expects it in milliseconds as int. This would lead to
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.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.