Skip to content
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

bugfix: fix tablemeta refresh after closed #7044

Merged
merged 8 commits into from
Dec 4, 2024

Conversation

LegGasai
Copy link
Contributor

@LegGasai LegGasai commented Dec 3, 2024

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 52.75%. Comparing base (db1567c) to head (4ba8f98).
Report is 1 commits behind head on 2.x.

Files with missing lines Patch % Lines
...m/datasource/sql/struct/TableMetaCacheFactory.java 0.00% 15 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #7044      +/-   ##
============================================
- Coverage     52.77%   52.75%   -0.02%     
- Complexity     6639     6640       +1     
============================================
  Files          1126     1126              
  Lines         40107    40122      +15     
  Branches       4697     4700       +3     
============================================
+ Hits          21167    21168       +1     
- Misses        16928    16944      +16     
+ Partials       2012     2010       -2     
Files with missing lines Coverage Δ
...m/datasource/sql/struct/TableMetaCacheFactory.java 40.74% <0.00%> (-15.67%) ⬇️

... and 2 files with indirect coverage changes

* @param ex the SQLException to check
* @return true if the exception indicates the data source is closed; false otherwise
*/
private boolean isDataSourceClosedException(SQLException ex) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's just the connection being closed, can the two be distinguished?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use sqlState 08006 and exception message keywords to distinguish

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@funky-eyes funky-eyes added this to the 2.3.0 milestone Dec 4, 2024
@funky-eyes funky-eyes added type: bug Category issues or prs related to bug. mode: AT AT transaction mode module/rm-datasource rm-datasource module multilingual labels Dec 4, 2024
@funky-eyes funky-eyes merged commit b44c626 into apache:2.x Dec 4, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mode: AT AT transaction mode module/rm-datasource rm-datasource module multilingual type: bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants