feat: tune timeouts and add logging to table trigger setup process#252
Draft
feat: tune timeouts and add logging to table trigger setup process#252
Conversation
…lt timeout for trigger setup and log warning upon timeout.
Collaborator
Author
|
Still a work in progress due to items on the TODO. |
| @staticmethod | ||
| async def create_trigger_if_missing(db: _AsyncPostgresDB, table_name, trigger_name, commands=[]): | ||
| "executes the commands only if a trigger with the given name does not already exist on the table" | ||
| # NOTE: keep a relatively low timeout for the setup queries, |
Contributor
There was a problem hiding this comment.
How would we set the timeout here differently than the other statements. I agree that these should have a very quick timeout and others can potentially be longer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add logging for when trigger setup is skipped, and when it fails.
Sets up server-side
statement_timeoutfor DBConfiguration as part of the connection pool for the ui_backend. default is kept as None in case timeouting behavior is not wanted for metadata service.asyncio.CancelledErrorandasyncio.TimeoutError