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 fetch PostgresqlTableMetaCache fail when the same table exists in different schemas #4308

Merged
merged 4 commits into from
Jan 19, 2022

Conversation

GoodBoyCoder
Copy link
Contributor

@GoodBoyCoder GoodBoyCoder commented Jan 18, 2022

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

如果SQL表名没有写明schema,使用connection获取当前连接的schema,防止不同schema下存在相同表而导致错误识别多主键

If the SQL table name does not specify schema, use connection to obtain the schema of the current connection to prevent the existence of the same table under different schemas and cause misidentification of multiple primary keys

Ⅱ. Does this pull request fix one issue?

fixes #3098

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Jan 18, 2022

Codecov Report

Merging #4308 (d1b4b15) into develop (21c103d) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #4308      +/-   ##
=============================================
- Coverage      48.53%   48.53%   -0.01%     
- Complexity      3799     3800       +1     
=============================================
  Files            725      725              
  Lines          24305    24306       +1     
  Branches        2984     2984              
=============================================
  Hits           11797    11797              
- Misses         11259    11261       +2     
+ Partials        1249     1248       -1     
Impacted Files Coverage Δ
...rce/sql/struct/cache/PostgresqlTableMetaCache.java 74.15% <100.00%> (+0.29%) ⬆️
...n/src/main/java/io/seata/common/util/IdWorker.java 77.08% <0.00%> (-6.25%) ⬇️
...in/java/io/seata/server/session/GlobalSession.java 79.31% <0.00%> (+0.43%) ⬆️
...o/seata/server/coordinator/DefaultCoordinator.java 49.35% <0.00%> (+0.43%) ⬆️

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

Copy link
Member

@jsbxyyx jsbxyyx 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 1.5.0 milestone Jan 19, 2022
@funky-eyes funky-eyes added module/rm-datasource rm-datasource module type: bug Category issues or prs related to bug. labels Jan 19, 2022
@funky-eyes funky-eyes merged commit 2c6e647 into apache:develop Jan 19, 2022
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.

LGTM

@GoodBoyCoder GoodBoyCoder deleted the fix_pg_tablerecord_cache branch April 26, 2022 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/rm-datasource rm-datasource module type: bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

使用pg数据库作为数据源,PostgresqlTableMetaCache 解析存在问题,multi pk only support mysql!
5 participants