Skip to content
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

crud: change timeout option type #343

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

DifferentialOrange
Copy link
Member

Timeout is an option supported for all crud operations using VShard API. In Lua, timeout has number type, so float values are allowed. Float timeouts can be useful to set the timeout less than a second. After this patch, Timeout will be an optional float64 instead of an optional int.

This is a breaking change.

CRUD allows to use negative timeouts. This approach does not make any sense for an operation: for example, initial schema fetch will fail. Since the module itself does not check for a negative value argument, we do not forbid it here too.

I didn't forget about:

Closes #342

@DifferentialOrange DifferentialOrange marked this pull request as ready for review October 31, 2023 14:06
README.md Outdated Show resolved Hide resolved
crud/options.go Show resolved Hide resolved
`Timeout` is an option supported for all crud operations using
VShard API. In Lua, timeout has `number` type, so float values are
allowed. Float timeouts can be useful to set the timeout less than
a second. After this patch, `Timeout` will be an optional float64
instead of an optional int.

This is a breaking change.

CRUD allows to use negative timeouts. This approach does not make any
sense for an operation: for example, initial schema fetch will fail.
Since the module itself does not check for a negative value argument,
we do not forbid it here too.

Closes #342
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-342-float-timeout branch from f1cb0b0 to c51e6a1 Compare November 1, 2023 07:47
Copy link
Collaborator

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch!

@oleg-jukovec oleg-jukovec merged commit 76d4125 into master Nov 1, 2023
22 checks passed
@oleg-jukovec oleg-jukovec deleted the DifferentialOrange/gh-342-float-timeout branch November 1, 2023 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v2: consider reworking timeout value
3 participants