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

Support distributed transactions across multiple logical database(#19… #20114

Merged
merged 8 commits into from
Aug 16, 2022

Conversation

FlyingZC
Copy link
Member

Fixes #19894.

Changes proposed in this pull request:

  • Support XA and BASE distributed transactions across multiple logical database
  • Allow use xx_db in transaction

@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2022

Codecov Report

Merging #20114 (7528131) into master (be5cfc2) will increase coverage by 0.42%.
The diff coverage is 61.62%.

@@             Coverage Diff              @@
##             master   #20114      +/-   ##
============================================
+ Coverage     60.54%   60.96%   +0.42%     
+ Complexity     2422     2418       -4     
============================================
  Files          3874     3873       -1     
  Lines         54796    54442     -354     
  Branches       7679     7626      -53     
============================================
+ Hits          33176    33191      +15     
+ Misses        18761    18390     -371     
- Partials       2859     2861       +2     
Impacted Files Coverage Δ
...or/original/table/FilterableTableScanExecutor.java 0.00% <ø> (ø)
...erter/segment/expression/impl/ColumnConverter.java 100.00% <ø> (+60.00%) ⬆️
...ter/segment/expression/impl/FunctionConverter.java 0.00% <ø> (ø)
...gment/expression/impl/ListExpressionConverter.java 0.00% <0.00%> (ø)
...nt/expression/impl/LiteralExpressionConverter.java 66.66% <ø> (+26.66%) ⬆️
...ssion/impl/ParameterMarkerExpressionConverter.java 0.00% <ø> (ø)
...verter/segment/from/impl/SimpleTableConverter.java 54.54% <ø> (+31.46%) ⬆️
...er/converter/segment/groupby/GroupByConverter.java 0.00% <0.00%> (ø)
...zer/converter/segment/groupby/HavingConverter.java 0.00% <0.00%> (ø)
...ter/segment/limit/PaginationValueSQLConverter.java 0.00% <ø> (ø)
... and 39 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@strongduanmu strongduanmu left a comment

Choose a reason for hiding this comment

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

@FlyingZC Please fix ci error first.

@FlyingZC
Copy link
Member Author

@FlyingZC Please fix ci error first.

I will check.

@@ -34,8 +35,10 @@ public final class ResourceDataSource {
private final DataSource dataSource;

public ResourceDataSource(final String originalName, final DataSource dataSource) {
final String[] databaseAndDataSourceName = originalName.split("\\.");
Copy link
Member

Choose a reason for hiding this comment

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

Please remove final here.

Copy link
Member Author

Choose a reason for hiding this comment

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

You ar right.

@@ -46,6 +48,7 @@ public ConnectionTransaction(final String databaseName, final TransactionRule ru
}

public ConnectionTransaction(final String databaseName, final TransactionType transactionType, final TransactionRule rule) {
this.databaseName = databaseName;
Copy link
Member

Choose a reason for hiding this comment

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

Should databaseName be extracted from SQL?

Copy link
Member Author

Choose a reason for hiding this comment

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

I will check.

@strongduanmu strongduanmu merged commit e16dff4 into apache:master Aug 16, 2022
TeslaCN added a commit to TeslaCN/shardingsphere that referenced this pull request Aug 16, 2022
@FlyingZC FlyingZC deleted the feature-multi-logic-db-trans branch March 14, 2023 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The data source is messed up.
3 participants