-
Notifications
You must be signed in to change notification settings - Fork 3
Add rescue for ActiveRecord::SerializationFailure #63
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
base: master
Are you sure you want to change the base?
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.
Pull Request Overview
This PR adds automatic retry logic to handle database serialization failures in the execute_query method. When a SerializationFailure exception occurs during query execution, the operation is automatically retried after logging a warning message.
- Wraps the entire query execution logic in a begin-rescue-retry block to handle
ActiveRecord::SerializationFailureexceptions - Adds warning logging when serialization failures occur
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@kevin-pattern I've opened a new pull request, #64, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@kevin-pattern I've opened a new pull request, #65, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
Thanks for the review, @mayank0109! How can we test this before merging? I think we have to publish the gem and set the updated version in AdCzar, for example, correct? |
satishaher
left a comment
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.
We need to take a tag after merging this and use that in adczar.
Context: https://patterninc.slack.com/archives/C09QKPMU3K6
Fixes:
DD Link: https://app.datadoghq.com/apm/trace/13276438074009828619?graphType=span_list&shouldShowLegend=true&spanID=1605746623249566574&timeHint=1762189290547.8765&traceQuery=