-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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: undo_log table check optimize #6031
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 2.x #6031 +/- ##
============================================
+ Coverage 49.45% 49.52% +0.06%
- Complexity 4748 4752 +4
============================================
Files 908 908
Lines 31354 31355 +1
Branches 3777 3776 -1
============================================
+ Hits 15505 15527 +22
+ Misses 14310 14292 -18
+ Partials 1539 1536 -3
|
# Conflicts: # changes/en-us/2.0.0.md # changes/zh-cn/2.0.0.md # rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceProxy.java # rm-datasource/src/test/java/io/seata/rm/RMHandlerATTest.java
@@ -9,7 +9,7 @@ | |||
- [[#PR_NO](https://github.com/seata/seata/pull/PR_NO)] 准确简要的PR描述 | |||
|
|||
### optimize: | |||
- [[#PR_NO](https://github.com/seata/seata/pull/PR_NO)] 准确简要的PR描述 | |||
- [[#6031](https://github.com/seata/seata/pull/6031)] 添加undo_log表的存在性校验 |
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.
该版本下首次提交pr,作者信息需要进行登记一下
For the first PR submission in this version, the author's information needs to be registered.
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.
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.
你看下中文的那份文件是否没登记
Check if the Chinese file is not registered.
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.
done
try { | ||
undoLogManager = UndoLogManagerFactory.getUndoLogManager(dbType); | ||
} catch (EnhancedServiceNotFoundException e) { | ||
LOGGER.error("can't find undoLogManager service provider for dbtype: {}", dbType); |
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.
我建议这里直接抛异常出去,说明用户再使用一个我们不支持的数据库,要提示这个数据库不支持
I suggest throwing an exception directly here, indicating that if the user uses a database that we do not support, we need to prompt that the database is not supported.
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.
没有抛出去,是因为很多单测使用了数据库代理,会导致单测失败。
It is not thrown out because many unit tests use database proxy, which can be lead it fail.
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.
没有抛出去,是因为很多单测使用了数据库代理,会导致单测失败。 It is not thrown out because many unit tests use database proxy, which can be lead it fail.
有没有什么办法在单测的时候不进行校验undolog table?或者增加一个开关,这个开关允许用户配置check,如果用户关闭,就不进行check,然后我们默认开启,在单测的时候关闭check
Is there any way to not check undolog table during single test or add a switch that allows user to configure check and if user turns it off, no check is performed, then we turn it on by default and turn off check during single test
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.
update mockito version to 4.5.1 same as seata server's mockito dependency to support static mock. when unit test. mock undolog table check.
…atic mock 2. throw exception when the db type not support in AT mode 3. add author register info
# Conflicts: # changes/zh-cn/2.x.md
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
Ⅰ. Describe what this PR did
#6022
Ⅱ. Does this pull request fix one issue?
fixes #6022
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews