You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/03/03 10:50:15 UTC
[GitHub] [shardingsphere] jingshanglu opened a new pull request #15779: support auto rollback when report exception in transaction block.
jingshanglu opened a new pull request #15779:
URL: https://github.com/apache/shardingsphere/pull/15779
[design detail](https://u01f1kqxrl.feishu.cn/docs/doccntaO4s7K5I5FbML5UAponJe#)
Changes proposed in this pull request:
- support auto rollback when report exception in transaction block for postgresql and opengauss
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on a change in pull request #15779: support auto rollback when report exception in transaction block.
Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #15779:
URL: https://github.com/apache/shardingsphere/pull/15779#discussion_r820246540
##########
File path: shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java
##########
@@ -107,6 +110,12 @@ private boolean executeCommand(final ChannelHandlerContext context, final Packet
return databaseProtocolFrontendEngine.getFrontendContext().isFlushForPerCommandPacket();
}
+ private void setRollbackOnly() {
+ if (databaseProtocolFrontendEngine.getDatabaseType().equals("PostgreSQL") || "openGauss".equals(databaseProtocolFrontendEngine.getDatabaseType())) {
+ connectionSession.getTransactionStatus().setRollbackOnly(true);
+ }
Review comment:
Please use SPI
##########
File path: shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/spi/ShardingSphereTransactionManager.java
##########
@@ -80,6 +80,13 @@
*/
void commit();
Review comment:
Is `commit` still useful?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jingshanglu commented on pull request #15779: support auto rollback when report exception in transaction block.
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on pull request #15779:
URL: https://github.com/apache/shardingsphere/pull/15779#issuecomment-1060156981
> > [design detail](https://u01f1kqxrl.feishu.cn/docs/doccntaO4s7K5I5FbML5UAponJe#)
> > Changes proposed in this pull request:
> >
> > * support auto rollback when report exception in transaction block for postgresql and opengauss
>
> @jingshanglu Hi, could you give the English version on GitHub?
ok
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu merged pull request #15779: support auto rollback when report exception in transaction block.
Posted by GitBox <gi...@apache.org>.
terrymanu merged pull request #15779:
URL: https://github.com/apache/shardingsphere/pull/15779
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jingshanglu commented on a change in pull request #15779: support auto rollback when report exception in transaction block.
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #15779:
URL: https://github.com/apache/shardingsphere/pull/15779#discussion_r820418684
##########
File path: shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-core/src/main/java/org/apache/shardingsphere/transaction/spi/ShardingSphereTransactionManager.java
##########
@@ -80,6 +80,13 @@
*/
void commit();
Review comment:
sharding-jdbc use it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on pull request #15779: support auto rollback when report exception in transaction block.
Posted by GitBox <gi...@apache.org>.
terrymanu commented on pull request #15779:
URL: https://github.com/apache/shardingsphere/pull/15779#issuecomment-1059977263
> [design detail](https://u01f1kqxrl.feishu.cn/docs/doccntaO4s7K5I5FbML5UAponJe#)
>
> Changes proposed in this pull request:
>
> * support auto rollback when report exception in transaction block for postgresql and opengauss
@jingshanglu Hi, could you give the English version on GitHub?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] codecov-commenter commented on pull request #15779: support auto rollback when report exception in transaction block.
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #15779:
URL: https://github.com/apache/shardingsphere/pull/15779#issuecomment-1060589634
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/15779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#15779](https://codecov.io/gh/apache/shardingsphere/pull/15779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a58a8f1) into [master](https://codecov.io/gh/apache/shardingsphere/commit/6ba23910f14269285cdfc82953de94b7c4ecb638?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6ba2391) will **increase** coverage by `0.11%`.
> The diff coverage is `14.28%`.
[](https://codecov.io/gh/apache/shardingsphere/pull/15779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #15779 +/- ##
============================================
+ Coverage 60.35% 60.47% +0.11%
- Complexity 2002 2015 +13
============================================
Files 3250 3261 +11
Lines 48950 49162 +212
Branches 8371 8423 +52
============================================
+ Hits 29546 29732 +186
- Misses 16962 16973 +11
- Partials 2442 2457 +15
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/15779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ta/at/SeataATShardingSphereTransactionManager.java](https://codecov.io/gh/apache/shardingsphere/pull/15779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLXRyYW5zYWN0aW9uL3NoYXJkaW5nc3BoZXJlLXRyYW5zYWN0aW9uLXR5cGUvc2hhcmRpbmdzcGhlcmUtdHJhbnNhY3Rpb24tYmFzZS9zaGFyZGluZ3NwaGVyZS10cmFuc2FjdGlvbi1iYXNlLXNlYXRhLWF0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS90cmFuc2FjdGlvbi9iYXNlL3NlYXRhL2F0L1NlYXRhQVRTaGFyZGluZ1NwaGVyZVRyYW5zYWN0aW9uTWFuYWdlci5qYXZh) | `88.46% <0.00%> (-3.54%)` | :arrow_down: |
| [...saction/xa/XAShardingSphereTransactionManager.java](https://codecov.io/gh/apache/shardingsphere/pull/15779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLXRyYW5zYWN0aW9uL3NoYXJkaW5nc3BoZXJlLXRyYW5zYWN0aW9uLXR5cGUvc2hhcmRpbmdzcGhlcmUtdHJhbnNhY3Rpb24teGEvc2hhcmRpbmdzcGhlcmUtdHJhbnNhY3Rpb24teGEtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdHJhbnNhY3Rpb24veGEvWEFTaGFyZGluZ1NwaGVyZVRyYW5zYWN0aW9uTWFuYWdlci5qYXZh) | `64.28% <0.00%> (-8.69%)` | :arrow_down: |
| [...backend/session/transaction/TransactionStatus.java](https://codecov.io/gh/apache/shardingsphere/pull/15779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9zZXNzaW9uL3RyYW5zYWN0aW9uL1RyYW5zYWN0aW9uU3RhdHVzLmphdmE=) | `70.00% <ø> (ø)` | |
| [...nd/text/transaction/TransactionBackendHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/15779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L3RyYW5zYWN0aW9uL1RyYW5zYWN0aW9uQmFja2VuZEhhbmRsZXIuamF2YQ==) | `20.40% <0.00%> (-3.99%)` | :arrow_down: |
| [...here/proxy/frontend/mysql/MySQLFrontendEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/15779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQtbXlzcWwvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Byb3h5L2Zyb250ZW5kL215c3FsL015U1FMRnJvbnRlbmRFbmdpbmUuamF2YQ==) | `45.45% <0.00%> (-4.55%)` | :arrow_down: |
| [...xy/frontend/opengauss/OpenGaussFrontendEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/15779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQtb3BlbmdhdXNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9wcm94eS9mcm9udGVuZC9vcGVuZ2F1c3MvT3BlbkdhdXNzRnJvbnRlbmRFbmdpbmUuamF2YQ==) | `64.28% <0.00%> (-17.54%)` | :arrow_down: |
| [.../frontend/postgresql/PostgreSQLFrontendEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/15779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvZnJvbnRlbmQvcG9zdGdyZXNxbC9Qb3N0Z3JlU1FMRnJvbnRlbmRFbmdpbmUuamF2YQ==) | `64.28% <0.00%> (-17.54%)` | :arrow_down: |
| [...ive/mysql/command/ReactiveMySQLFrontendEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/15779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQtcmVhY3RpdmUtbXlzcWwvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Byb3h5L2Zyb250ZW5kL3JlYWN0aXZlL215c3FsL2NvbW1hbmQvUmVhY3RpdmVNeVNRTEZyb250ZW5kRW5naW5lLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...dbc/transaction/JDBCBackendTransactionManager.java](https://codecov.io/gh/apache/shardingsphere/pull/15779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9jb21tdW5pY2F0aW9uL2pkYmMvdHJhbnNhY3Rpb24vSkRCQ0JhY2tlbmRUcmFuc2FjdGlvbk1hbmFnZXIuamF2YQ==) | `86.00% <100.00%> (+0.58%)` | :arrow_up: |
| [...re/proxy/frontend/command/CommandExecutorTask.java](https://codecov.io/gh/apache/shardingsphere/pull/15779/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvZnJvbnRlbmQvY29tbWFuZC9Db21tYW5kRXhlY3V0b3JUYXNrLmphdmE=) | `76.59% <100.00%> (+0.50%)` | :arrow_up: |
| ... and [71 more](https://codecov.io/gh/apache/shardingsphere/pull/15779/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/15779?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/15779?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6ba2391...a58a8f1](https://codecov.io/gh/apache/shardingsphere/pull/15779?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org