-
Notifications
You must be signed in to change notification settings - Fork 258
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
Timeout policy #893
Timeout policy #893
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good change insofar that it moves the timeout logic from the specific endpoints to a generalized middleware.
I don't particularly like that this then requires constructing a context
object manually which needs to be passed. But that's the design we currently have, and I'm happy to do the work to streamline that part of it.
Either way, keen to have this merged!
With multiple PRs landing one on top of each other, not all of the timeouts as part of the bulider patterns were removed during Azure#893. These remove all but two that use the Storage crate, both in `data_tables`. 1. TransactionBuilder. This Builder does not use `setters`, but instead provides it's own builder methods to enable adding multiple database operations into the single transaction. It does not need the `setters` portion of the operation macro, but should still be a builder. 2. UpdateOrMergeEntityBuilder. This no longer needs to be a builder, as the only optional field is now handled via aforementioned PR.
With multiple PRs landing one on top of each other, not all of the timeouts as part of the bulider patterns were removed during #893. These remove all but two that use the Storage crate, both in `data_tables`. 1. TransactionBuilder. This Builder does not use `setters`, but instead provides it's own builder methods to enable adding multiple database operations into the single transaction. It does not need the `setters` portion of the operation macro, but should still be a builder. 2. UpdateOrMergeEntityBuilder. This no longer needs to be a builder, as the only optional field is now handled via aforementioned PR. Co-authored-by: Brian Caswell <[email protected]>
This adds a timeout policy to storage clients.
Now the user can use the
context
option to specify timeouts as well as set a default timeout for all operations.Note: the experience for actually setting a timeout is somewhat worse, but this is because the context API is a bit awkward. That needs to be improved independent of this change.