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

feature:support batch update and batch delete #1353

Merged
merged 16 commits into from
Aug 8, 2019

Conversation

zjinlei
Copy link
Contributor

@zjinlei zjinlei commented Jul 26, 2019

Ⅰ. 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

@codecov-io
Copy link

Codecov Report

Merging #1353 into develop will decrease coverage by 0.07%.
The diff coverage is 28%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1353      +/-   ##
=============================================
- Coverage       48.6%   48.53%   -0.08%     
  Complexity      1645     1645              
=============================================
  Files            331      331              
  Lines          11535    11566      +31     
  Branches        1430     1445      +15     
=============================================
+ Hits            5607     5613       +6     
- Misses          5306     5330      +24     
- Partials         622      623       +1
Impacted Files Coverage Δ Complexity Δ
.../rm/datasource/AbstractPreparedStatementProxy.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...io/seata/rm/datasource/AbstractStatementProxy.java 10.16% <ø> (+0.33%) 2 <0> (ø) ⬇️
...ta/rm/datasource/exec/SelectForUpdateExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...va/io/seata/rm/datasource/exec/UpdateExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...in/java/io/seata/rm/datasource/StatementProxy.java 13.88% <0%> (-0.82%) 3 <0> (ø)
...va/io/seata/rm/datasource/exec/DeleteExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...rm/datasource/sql/druid/MySQLDeleteRecognizer.java 76.31% <100%> (+2.03%) 6 <0> (ø) ⬇️
...urce/sql/druid/MySQLSelectForUpdateRecognizer.java 70.58% <100%> (+1.83%) 7 <0> (ø) ⬇️
...rm/datasource/sql/druid/MySQLUpdateRecognizer.java 64.7% <73.33%> (+1.62%) 10 <0> (ø) ⬇️
...server/store/file/FileTransactionStoreManager.java 45.99% <0%> (-1.05%) 19% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3665aec...ee57d7e. Read the comment docs.

3 similar comments
@codecov-io
Copy link

Codecov Report

Merging #1353 into develop will decrease coverage by 0.07%.
The diff coverage is 28%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1353      +/-   ##
=============================================
- Coverage       48.6%   48.53%   -0.08%     
  Complexity      1645     1645              
=============================================
  Files            331      331              
  Lines          11535    11566      +31     
  Branches        1430     1445      +15     
=============================================
+ Hits            5607     5613       +6     
- Misses          5306     5330      +24     
- Partials         622      623       +1
Impacted Files Coverage Δ Complexity Δ
.../rm/datasource/AbstractPreparedStatementProxy.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...io/seata/rm/datasource/AbstractStatementProxy.java 10.16% <ø> (+0.33%) 2 <0> (ø) ⬇️
...ta/rm/datasource/exec/SelectForUpdateExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...va/io/seata/rm/datasource/exec/UpdateExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...in/java/io/seata/rm/datasource/StatementProxy.java 13.88% <0%> (-0.82%) 3 <0> (ø)
...va/io/seata/rm/datasource/exec/DeleteExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...rm/datasource/sql/druid/MySQLDeleteRecognizer.java 76.31% <100%> (+2.03%) 6 <0> (ø) ⬇️
...urce/sql/druid/MySQLSelectForUpdateRecognizer.java 70.58% <100%> (+1.83%) 7 <0> (ø) ⬇️
...rm/datasource/sql/druid/MySQLUpdateRecognizer.java 64.7% <73.33%> (+1.62%) 10 <0> (ø) ⬇️
...server/store/file/FileTransactionStoreManager.java 45.99% <0%> (-1.05%) 19% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3665aec...ee57d7e. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #1353 into develop will decrease coverage by 0.07%.
The diff coverage is 28%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1353      +/-   ##
=============================================
- Coverage       48.6%   48.53%   -0.08%     
  Complexity      1645     1645              
=============================================
  Files            331      331              
  Lines          11535    11566      +31     
  Branches        1430     1445      +15     
=============================================
+ Hits            5607     5613       +6     
- Misses          5306     5330      +24     
- Partials         622      623       +1
Impacted Files Coverage Δ Complexity Δ
.../rm/datasource/AbstractPreparedStatementProxy.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...io/seata/rm/datasource/AbstractStatementProxy.java 10.16% <ø> (+0.33%) 2 <0> (ø) ⬇️
...ta/rm/datasource/exec/SelectForUpdateExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...va/io/seata/rm/datasource/exec/UpdateExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...in/java/io/seata/rm/datasource/StatementProxy.java 13.88% <0%> (-0.82%) 3 <0> (ø)
...va/io/seata/rm/datasource/exec/DeleteExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...rm/datasource/sql/druid/MySQLDeleteRecognizer.java 76.31% <100%> (+2.03%) 6 <0> (ø) ⬇️
...urce/sql/druid/MySQLSelectForUpdateRecognizer.java 70.58% <100%> (+1.83%) 7 <0> (ø) ⬇️
...rm/datasource/sql/druid/MySQLUpdateRecognizer.java 64.7% <73.33%> (+1.62%) 10 <0> (ø) ⬇️
...server/store/file/FileTransactionStoreManager.java 45.99% <0%> (-1.05%) 19% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3665aec...ee57d7e. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #1353 into develop will decrease coverage by 0.07%.
The diff coverage is 28%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1353      +/-   ##
=============================================
- Coverage       48.6%   48.53%   -0.08%     
  Complexity      1645     1645              
=============================================
  Files            331      331              
  Lines          11535    11566      +31     
  Branches        1430     1445      +15     
=============================================
+ Hits            5607     5613       +6     
- Misses          5306     5330      +24     
- Partials         622      623       +1
Impacted Files Coverage Δ Complexity Δ
.../rm/datasource/AbstractPreparedStatementProxy.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...io/seata/rm/datasource/AbstractStatementProxy.java 10.16% <ø> (+0.33%) 2 <0> (ø) ⬇️
...ta/rm/datasource/exec/SelectForUpdateExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...va/io/seata/rm/datasource/exec/UpdateExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...in/java/io/seata/rm/datasource/StatementProxy.java 13.88% <0%> (-0.82%) 3 <0> (ø)
...va/io/seata/rm/datasource/exec/DeleteExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...rm/datasource/sql/druid/MySQLDeleteRecognizer.java 76.31% <100%> (+2.03%) 6 <0> (ø) ⬇️
...urce/sql/druid/MySQLSelectForUpdateRecognizer.java 70.58% <100%> (+1.83%) 7 <0> (ø) ⬇️
...rm/datasource/sql/druid/MySQLUpdateRecognizer.java 64.7% <73.33%> (+1.62%) 10 <0> (ø) ⬇️
...server/store/file/FileTransactionStoreManager.java 45.99% <0%> (-1.05%) 19% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3665aec...ee57d7e. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Jul 30, 2019

Codecov Report

Merging #1353 into develop will decrease coverage by 0.1%.
The diff coverage is 25.77%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1353      +/-   ##
=============================================
- Coverage      45.54%   45.43%   -0.11%     
- Complexity      1661     1662       +1     
=============================================
  Files            345      345              
  Lines          12667    12683      +16     
  Branches        1598     1607       +9     
=============================================
- Hits            5769     5763       -6     
- Misses          6250     6272      +22     
  Partials         648      648
Impacted Files Coverage Δ Complexity Δ
.../rm/datasource/AbstractPreparedStatementProxy.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...io/seata/rm/datasource/AbstractStatementProxy.java 15.25% <ø> (+0.5%) 4 <0> (ø) ⬇️
...ta/rm/datasource/exec/SelectForUpdateExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
.../druid/oracle/OracleSelectForUpdateRecognizer.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...ource/sql/druid/oracle/OracleUpdateRecognizer.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...va/io/seata/rm/datasource/exec/UpdateExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...in/java/io/seata/rm/datasource/StatementProxy.java 22.22% <0%> (-1.31%) 4 <0> (ø)
...ource/sql/druid/oracle/OracleDeleteRecognizer.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...va/io/seata/rm/datasource/exec/DeleteExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...rm/datasource/sql/druid/MySQLDeleteRecognizer.java 74.19% <100%> (-0.1%) 6 <0> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e66faf9...4780f59. Read the comment docs.

@xingfudeshi xingfudeshi self-requested a review August 3, 2019 01:31
Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

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

LGTM.

ps.setObject(i + 1, paramAppender.get(i));
}
} else {
for (int i = 1; i < paramAppenders.size(); i++) {
Copy link
Member

Choose a reason for hiding this comment

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

UNION -> OR?

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.

function test pass.

pstPK.setObject(i + 1, paramAppender.get(i));
}
} else {
for (int i = 1; i < paramAppenders.size(); i++) {
Copy link
Member

Choose a reason for hiding this comment

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

What scene?

@slievrly slievrly changed the title support batch update and batch delete feature:support batch update and batch delete Aug 8, 2019
@slievrly slievrly merged commit b882fbf into apache:develop Aug 8, 2019
@zjinlei zjinlei deleted the feature/batch/updateAndDelete branch August 9, 2019 09:06
@wangliang181230 wangliang181230 added this to the 0.8.1 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.

None yet

5 participants