-
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
add jackson serialization #1133
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1133 +/- ##
=============================================
- Coverage 41.93% 41.92% -0.01%
- Complexity 1385 1390 +5
=============================================
Files 246 247 +1
Lines 10248 10282 +34
Branches 1343 1346 +3
=============================================
+ Hits 4297 4311 +14
- Misses 5387 5408 +21
+ Partials 564 563 -1
Continue to review full report at Codecov.
|
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 will check sql type: timestamp date int(11) later
There was a PR (#1125 ) about adding protostuff as the serializer of UndoLogParser. JSON is inefficient, is it necessary to add a jackson serialization ? |
import java.sql.SQLException; | ||
import java.sql.Statement; | ||
import java.sql.Types; | ||
import java.sql.*; |
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.
forbid to use *
@@ -57,14 +55,6 @@ public static boolean isFieldEquals(Field f0, Field f1) { | |||
if (f1.getValue() == null) { | |||
return false; | |||
} else { | |||
int f0Type = f0.getType(); |
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 want to temporarily keep fastjson, can you make a judgment?
# Conflicts: # rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoLogParserFactory.java # rm-datasource/src/main/resources/META-INF/services/io.seata.rm.datasource.undo.UndoLogParser # rm-datasource/src/test/java/io/seata/rm/datasource/undo/UndoLogParserFactoryTest.java # rm-datasource/src/test/java/io/seata/rm/datasource/undo/UndoLogParserProviderTest.java
Functional Verification: bigint(11), date, time, timestamp check ok. |
|
||
@Override | ||
public String getName() { | ||
return "jackson"; |
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.
Constant like fastjson
@@ -187,6 +192,8 @@ public static void undo(DataSourceProxy dataSourceProxy, String xid, long branch | |||
sqlUndoLog); | |||
undoExecutor.executeOn(conn); | |||
} | |||
// remove serializer name | |||
SERIALIZER_LOCAL.remove(); |
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.
better add in finally block?
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
fix: #1116