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: new connection can't be get when connection is not released #2068

Merged
merged 13 commits into from
Dec 20, 2019

Conversation

zjinlei
Copy link
Contributor

@zjinlei zjinlei commented Dec 20, 2019

Ⅰ. Describe what this PR did

When an rm is executed, its own business execution requires a database connection, Seata took 2 additional connections for the table meta.
During concurrency, there is not enough connection to the table meta, and druid will wait forever if it can't get the connection, so rm stuck.
The solution to this pr: makes connection reuse.

Ⅱ. Does this pull request fix one issue?

fixes #2069

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Dec 20, 2019

Codecov Report

Merging #2068 into develop will decrease coverage by 0.1%.
The diff coverage is 40%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2068      +/-   ##
=============================================
- Coverage      55.26%   55.16%   -0.11%     
+ Complexity      2523     2515       -8     
=============================================
  Files            446      446              
  Lines          14927    14922       -5     
  Branches        1770     1768       -2     
=============================================
- Hits            8249     8231      -18     
- Misses          5911     5923      +12     
- Partials         767      768       +1
Impacted Files Coverage Δ Complexity Δ
...ata/rm/datasource/undo/AbstractUndoLogManager.java 59.14% <0%> (ø) 17 <0> (ø) ⬇️
...n/java/io/seata/rm/datasource/DataSourceProxy.java 54.28% <0%> (-23.84%) 9 <0> (-2)
...o/seata/rm/datasource/AbstractConnectionProxy.java 11.7% <0%> (-5.51%) 5 <0> (-3)
...asource/sql/struct/cache/OracleTableMetaCache.java 6.12% <0%> (+0.24%) 3 <0> (ø) ⬇️
.../rm/datasource/exec/BaseTransactionalExecutor.java 44.35% <100%> (ø) 20 <0> (ø) ⬇️
...tasource/sql/struct/cache/MysqlTableMetaCache.java 81.13% <100%> (+0.05%) 11 <1> (ø) ⬇️
...ource/sql/struct/cache/AbstractTableMetaCache.java 81.81% <80%> (-6.07%) 9 <1> (-2)
...o/seata/rm/datasource/AbstractDataSourceProxy.java 23.07% <0%> (-7.7%) 1% <0%> (-1%)

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

Most valuable PR.

Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

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

LGTM

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

@zjinlei zjinlei changed the title bugfix: connection block bugfix: new connection cannot be taken when connection is not released Dec 20, 2019
@slievrly slievrly changed the title bugfix: new connection cannot be taken when connection is not released bugfix: new connection can't be get when connection is not released Dec 20, 2019
@slievrly slievrly merged commit 9063d4f into apache:develop Dec 20, 2019
@zjinlei zjinlei deleted the conn branch December 21, 2019 00:42
@wangliang181230 wangliang181230 added this to the 1.0.0 milestone Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Branch transactions stuck during concurrency
6 participants