feature:add xa transaction 增加XA事物支持#27
Merged
PandaLIU-1111 merged 20 commits intodtm-php:masterfrom Aug 16, 2022
Merged
Conversation
85969cd to
18d670c
Compare
Member
# Conflicts: # src/Dtmimp.php
yedf2
reviewed
Aug 16, 2022
| $this->dbTransaction->xaExec($sql); | ||
| } catch (PDOException $exception) { | ||
| // Repeat commit/rollback with the same id, report this error, ignore | ||
| if (! str_contains($exception->getMessage(), 'XAER_NOTA') && ! str_contains($exception->getMessage(), 'does not exist')) { |
Contributor
There was a problem hiding this comment.
这种错误判断在Go里面是可以的,但是在PHP里面,不确定是否可以,最好是实测一下
yedf2
reviewed
Aug 16, 2022
| $this->dbTransaction->xaExec($sql); | ||
| $sql = $this->DBSpecial->getXaSQL('prepare', $xaId); | ||
| $this->dbTransaction->xaExec($sql); | ||
| } |
Contributor
There was a problem hiding this comment.
这里面好像没看到如何处理异常,假如中间出现错误了,这个数据库连接会被断开吗?已执行的sql会被回滚吗?
Contributor
There was a problem hiding this comment.
如果出现异常会回滚
能否简单介绍一下碰见异常时,相关的异常会在哪个地方处理
Member
There was a problem hiding this comment.
如果出现异常会回滚
能否简单介绍一下碰见异常时,相关的异常会在哪个地方处理
这个确实没有加回滚,已经加上去了
Contributor
|
这个PR的自动测试貌似没有过,能否看看是因为什么吗?最好是能够过了 |
Member
这个我晚点调整一下 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.