-
Notifications
You must be signed in to change notification settings - Fork 6
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
MTG-1110 Add request timeout for PG DB query #371
MTG-1110 Add request timeout for PG DB query #371
Conversation
andrii-kl
commented
Jan 16, 2025
- Added configurable timeout for the PG database queries
- Added environment variables to configure PG database timeouts
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.
LBTM, feel free to add suggested changes
.map_err(|e| { | ||
if e.to_string().contains("statement timeout") { | ||
StorageError::QueryTimedOut | ||
} else { | ||
StorageError::Common(e.to_string()) | ||
} | ||
})?; | ||
|
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.
would be cool if we could statically type the error in IndexDbError, but if it's not possible then i'm ok with what written here and below
- Added configurable timeout for the PG database queries - Added environment variables to configure PG database timeouts
- change error code for Query Timed Out error
- simpl optimisations
- update CHANGELOG.md
8231c84
to
752fc40
Compare
currently we have
|