-
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
refactor: Replace tableMetaCache and undoLogManager with SPI #2055
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2055 +/- ##
============================================
- Coverage 54.52% 54.32% -0.2%
- Complexity 2471 2492 +21
============================================
Files 446 454 +8
Lines 14717 14880 +163
Branches 1729 1753 +24
============================================
+ Hits 8024 8084 +60
- Misses 5937 6025 +88
- Partials 756 771 +15
|
Thanks! |
I hope you can join the seata development team, i8vx5rv is my DingTalk ID, please add friends. |
thanks, My pleasure |
# Conflicts: # rm-datasource/src/main/java/io/seata/rm/datasource/AbstractConnectionProxy.java # rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/cache/MysqlTableMetaCache.java # rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/cache/OracleTableMetaCache.java # rm-datasource/src/main/java/io/seata/rm/datasource/undo/AbstractUndoLogManager.java
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
# Conflicts: # rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCacheFactory.java # rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoExecutorFactory.java # rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoLogManagerFactory.java # rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoLogManager.java # sqlparser/seata-sqlparser-druid/src/main/java/io/seata/sqlparser/druid/MySqlOperateRecognizerHolder.java # sqlparser/seata-sqlparser-druid/src/main/java/io/seata/sqlparser/druid/oracle/OracleOperateRecognizerHolder.java
# Conflicts: # sqlparser/seata-sqlparser-druid/src/main/java/io/seata/sqlparser/druid/mysql/MySQLOperateRecognizerHolder.java
@@ -288,7 +281,7 @@ public void undo(DataSourceProxy dataSourceProxy, String xid, long branchId) thr | |||
Collections.reverse(sqlUndoLogs); | |||
} | |||
for (SQLUndoLog sqlUndoLog : sqlUndoLogs) { | |||
TableMeta tableMeta = TableMetaCacheFactory.getTableMetaCache(dataSourceProxy).getTableMeta( | |||
TableMeta tableMeta = TableMetaCacheFactory.getTableMetaCache(dataSourceProxy.getDbType()).getTableMeta( |
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.
dataSourceProxy.getDbType() return SqlParser.getDbType, but in other places is returned we define constants, whether there is the risk of inconsistent?
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.
Yes, there is a problem. It has been corrected
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
Replace with SPI
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews