Skip to content
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: support kryo 5.3.0 #4968

Merged
merged 6 commits into from
Oct 1, 2022
Merged

feature: support kryo 5.3.0 #4968

merged 6 commits into from
Oct 1, 2022

Conversation

JavaLionLi
Copy link
Contributor

@JavaLionLi JavaLionLi commented Sep 28, 2022

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

升级 kryo依赖到5.X 4.X于2018年停止维护了

Ⅱ. Does this pull request fix one issue?

fixes #4961

Ⅲ. Why don't you add test cases (unit test/integration test)?

image

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@JavaLionLi
Copy link
Contributor Author

晕 不了解seata源码 改不明白了

@JavaLionLi
Copy link
Contributor Author

全局依赖版本都替换了 rm-datasource 模块就是找不到.....

@slievrly
Copy link
Member

@JavaLionLi io.seata.rm.datasource.undo.parser.KryoSerializerFactory io.seata.serializer.kryo.KryoSerializerFactory

@JavaLionLi
Copy link
Contributor Author

io.seata.rm.datasource.undo.parser.KryoSerializerFactory io.seata.serializer.kryo.KryoSerializerFactory

谢谢 找到了 已经更改提交了


private static final Logger LOGGER = LoggerFactory.getLogger(KryoSerializerFactory.class);

private static final KryoSerializerFactory FACTORY = new KryoSerializerFactory();

private KryoPool pool = new KryoPool.Builder(this).softReferences().build();
private Pool<Kryo> pool = new Pool<Kryo>(true, true) {
Copy link
Member

@slievrly slievrly Sep 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why abandon the previous method of calling?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? I don't understand what you mean

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change private KryoPool pool = new KryoPool.Builder(this).softReferences().build(); to private Pool<Kryo> pool = new Pool<Kryo>(true, true) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change private KryoPool pool = new KryoPool.Builder(this).softReferences().build(); to private Pool<Kryo> pool = new Pool<Kryo>(true, true) ?

Because 5. X KryoPool was deleted

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change private KryoPool pool = new KryoPool.Builder(this).softReferences().build(); to private Pool<Kryo> pool = new Pool<Kryo>(true, true) ?

image
Replaced by this class

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KryoFactory#create method does not exist in the new version?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsbxyyx please take a look.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slievrly yes, 5.3.0 deleted builder api.

@funky-eyes funky-eyes changed the title update kryo 4.0.2 => 5.3.0 feature: support kryo 5.3.0 Sep 28, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2022

Codecov Report

Merging #4968 (d770f87) into develop (d0f324c) will decrease coverage by 0.00%.
The diff coverage is 91.17%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #4968      +/-   ##
=============================================
- Coverage      48.77%   48.76%   -0.01%     
+ Complexity      4081     4078       -3     
=============================================
  Files            734      734              
  Lines          25855    25855              
  Branches        3190     3191       +1     
=============================================
- Hits           12611    12609       -2     
- Misses         11900    11902       +2     
  Partials        1344     1344              
Impacted Files Coverage Δ
.../datasource/undo/parser/KryoSerializerFactory.java 46.66% <83.33%> (ø)
...o/seata/serializer/kryo/KryoSerializerFactory.java 90.90% <100.00%> (ø)
...n/src/main/java/io/seata/common/util/IdWorker.java 77.08% <0.00%> (-6.25%) ⬇️
...erver/storage/file/session/FileSessionManager.java 48.40% <0.00%> (+0.63%) ⬆️

@funky-eyes funky-eyes added type: feature Category issues or prs related to feature request. first-time contributor first-time contributor module/serializer serializer module labels Sep 30, 2022
Copy link
Member

@jsbxyyx jsbxyyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 请在changes文件夹下的中英两版 develop.md中登记pr和作者信息

@JavaLionLi
Copy link
Contributor Author

LGTM 请在changes文件夹下的中英两版 develop.md中登记pr和作者信息

Registration completed

@funky-eyes funky-eyes merged commit dac8aa8 into apache:develop Oct 1, 2022
@funky-eyes funky-eyes added this to the 1.6.0 milestone Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-time contributor first-time contributor module/serializer serializer module multilingual type: feature Category issues or prs related to feature request.
Projects
None yet
5 participants