- 
                Notifications
    
You must be signed in to change notification settings  - Fork 194
 
SRE-627: match hibernate exception handling in jooq #3452
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?
SRE-627: match hibernate exception handling in jooq #3452
Conversation
| 
               | 
          ||
| private fun isMessageRetryable(th: SQLException) = | ||
| isConnectionClosed(th) || | ||
| isVitessTransactionNotFound(th) || | 
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.
There are quite a bit of other retryable message strings that we may want to include here that are in our JSC component. Perhaps worth a follow-up PR if we want to keep this PR simpler
2b8183c    to
    f6cdea1      
    Compare
  
    * match hibernate exception handling in jooq * do nto support cockroachdb
f104796    to
    2319b9a      
    Compare
  
    7f535aa    to
    46eb183      
    Compare
  
    46eb183    to
    9a0e5ab      
    Compare
  
    | @@ -0,0 +1,7 @@ | |||
| distributionBase=GRADLE_USER_HOME | |||
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.
This shouldn't be checked in, your local setup seems broken since it should be using Hermit?
        
          
                gradlew
              
                Outdated
          
        
      | @@ -0,0 +1,251 @@ | |||
| #!/bin/sh | |||
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.
delete pls
Hoist hibernate-like exception handling to misk-jdbc to cover other providers with the same logic
Description
Refactored the TransactionRetryHandler to make database exception retry logic specific to the database type being used.
Database-Specific Retry Logic: Retryable exceptions are now only checked for the configured database type:
API Changes
New Constructor: Added convenient TransactionRetryHandler(qualifierName, databaseType) constructor for easy database type-specific configuration
Backward Compatibility: Existing constructors and APIs remain unchanged
There should be no breaking changes, existing code should work:
Testing Strategy
New test cases included, https://gradle.com/s/7wbp6xzb5nt4q
Checklist