-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
optimize: build UndoItem logic #4282
optimize: build UndoItem logic #4282
Conversation
不知道这样改对不对,大佬看了之后麻烦指点一下哈 |
rm-datasource/src/main/java/io/seata/rm/datasource/exec/AbstractDMLBaseExecutor.java
Outdated
Show resolved
Hide resolved
rm-datasource/src/main/java/io/seata/rm/datasource/exec/AbstractDMLBaseExecutor.java
Outdated
Show resolved
Hide resolved
rm-datasource/src/test/java/io/seata/rm/datasource/exec/AbstractDMLBaseExecutorTest.java
Outdated
Show resolved
Hide resolved
rm-datasource/src/main/java/io/seata/rm/datasource/exec/mysql/MySQLInsertOrUpdateExecutor.java
Outdated
Show resolved
Hide resolved
rm-datasource/src/test/java/io/seata/rm/datasource/exec/AbstractDMLBaseExecutorTest.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## develop #4282 +/- ##
=============================================
- Coverage 49.02% 48.99% -0.04%
+ Complexity 3955 3950 -5
=============================================
Files 733 733
Lines 24974 24978 +4
Branches 3089 3092 +3
=============================================
- Hits 12243 12237 -6
- Misses 11434 11442 +8
- Partials 1297 1299 +2
|
rm-datasource/src/main/java/io/seata/rm/datasource/exec/mysql/MySQLInsertOrUpdateExecutor.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
acquire before image can also be moved into the if judgement. @xiaochangbai |
hello, 这个这样判断有点问题,我在用 mybatis-plus 的时候,使用 saveBatch 方法,它底层用的是 Statement.executeBatch 方法,这个方法无法返回影响的行数,导致你这里的判断会失效,所以没有生成undo log;除非开启这个参数 : [rewriteBatchedStatements] ,但是性能会下降很多 相关资料: 如果使用mybatis 原生的批量插入,底层调用的 是 Statement.execute 方法,这个方法可以获取到影响的行数,没有问题; seata 客户端版本 1.5.1 |
您好 我已经收到你的邮件,谢谢!HR
|
好,这个问题我看看。感谢您的反馈 |
Ⅰ. Describe what this PR did
optimize build UndoItem logic
Ⅱ. Does this pull request fix one issue?
fixes #4280
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews