-
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
feature: First support native-image
for seata-client
#5234
base: 2.x
Are you sure you want to change the base?
feature: First support native-image
for seata-client
#5234
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## 2.x #5234 +/- ##
============================================
- Coverage 48.89% 48.66% -0.23%
+ Complexity 4223 4164 -59
============================================
Files 764 745 -19
Lines 26870 26626 -244
Branches 3352 3327 -25
============================================
- Hits 13137 12957 -180
+ Misses 12353 12274 -79
- Partials 1380 1395 +15
|
…mage # Conflicts: # common/src/main/java/io/seata/common/util/ReflectionUtil.java # seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/java/io/seata/spring/boot/autoconfigure/provider/SpringBootConfigurationProvider.java
# Conflicts: # spring/src/main/java/io/seata/spring/annotation/GlobalTransactionScanner.java
由于 TCC 的重构,导致此PR有些内容未兼容。需要改造。
Ⅰ. Describe what this PR did
feature: First support
native-image
of theseata-client
.新特性:首次针对
native-image
做兼容性改造。已支持的功能:
暂未支持的功能:
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
mvn clean install -DskipTests
,将 jar包 install 到本地仓库。seata-support-aot
分支:https://github.com/wangliang181230/study-spring-boot/tree/seata-support-aottest-compatibility-springboot3-seata
小目录,不是study-spring-boot
大目录。mvn clean package -Pnative -e -DskipTests
,开始打包native-image
seata-server
mysql
,并创建数据库:seata_study
,再运行以下脚本创建表:startup-exe.bat
文件,启动native-image
。http://localhost:8081/
,测试成功情况;http://localhost:8081/?test=1
,测试 insert 语句完成后,抛异常的情况,观察表undo_log
中会有一条数据,等10秒后回滚后被删除。http://localhost:8081/?test=2
,测试 insert 语句 和tcc.prepare
方法完成后,抛异常的情况,观察表undo_log
中会有一条数据,等10秒后回滚后被删除。同时,控制台会打印类似test tcc: rollback......
字样。startup-exe-by-XA-mode.bat
,重复8、9、10步骤,测试XA
模式。Ⅴ. Special notes for reviews
seata-spring-framework-fake-for-java8
模块,仅为了使aot相关代码在java8可以编译通过。使seata
的jar包可以同时兼容高低版本的java
.