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

Reset transaction level to zero, when reconnent to mysql server. #1565

Merged
merged 7 commits into from Apr 15, 2020

Conversation

limingxinleo
Copy link
Member

No description provided.

Copy link
Member

@huangzhhui huangzhhui left a comment

Choose a reason for hiding this comment

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

这个要不要补个单测呢

@limingxinleo
Copy link
Member Author

这个要不要补个单测呢

嗯,我过会加一下

@tioncico
Copy link

此问题由easyswoole项目组成员发现并提出
【真群主】如果的如果 2020/4/14 星期二 10:59:52
get connection one
begin transaction
do sql one

connection one disconnect case network

do sql two

found exception

retry do sql two

get connection one

do sql two

commit

【真群主】如果的如果 2020/4/14 星期二 11:00:07
看着没问题 实际上 已经丢了sql one的结果

【真群主】如果的如果 2020/4/14 星期二 11:00:13
看的懂就看 看不懂就算

【吐槽】天口 2020/4/14 星期二 11:00:22
es这个很好玩

@limingxinleo
Copy link
Member Author

@tioncico 本来就是这样。。你连接都断了,如果第一条 SQL 生效了才是大故障。。

@limingxinleo
Copy link
Member Author

所以 PR 改成,如果事务内触发,就不再重连直接 抛错了

@limingxinleo limingxinleo merged commit 112e271 into hyperf:master Apr 15, 2020
@limingxinleo limingxinleo deleted the 1.1-dbb branch April 15, 2020 11:00
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

3 participants