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

optimize: optimize AbstractLockManager#collectRowLocks logic #4103

Merged
merged 6 commits into from
Oct 29, 2021

Conversation

XBNGit
Copy link
Contributor

@XBNGit XBNGit commented Oct 29, 2021

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

Optimization: confirm that the list is created only when necessary to help GC, issue #4101

Ⅱ. Does this pull request fix one issue?

fixes #4101

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

just the optimization of GC

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

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文件夹中英两版1.5.0md中登记你的pr记录和作者信息

@funky-eyes funky-eyes changed the title Optimization: confirm that the list is created only when necessary to help GC, issue #4101 optimize: optimize AbstractLockManager#collectRowLocks logic Oct 29, 2021
@funky-eyes
Copy link
Contributor

英文版直接按照标题填写登记即可,中文版可详细描述,比如 减少无需竞争锁时的内存占用

@funky-eyes
Copy link
Contributor

hello,欢迎你成为seata的贡献者,请将你的钉钉号发送至 364176773@qq.com 邮箱,我将会邀请你加入seata的贡献者队伍中

@funky-eyes funky-eyes added this to the 1.5.0 milestone Oct 29, 2021
@@ -126,7 +126,7 @@
- [[#4034](https://github.com/seata/seata/pull/4034)] optimize Nacos, Consul, Zookeeper and Etcd3 configuration Junit test Class
- [[#4055](https://github.com/seata/seata/pull/4055)] optimize NetUtil#getLocalAddress0
- [[#4056](https://github.com/seata/seata/pull/4056)] optimize the DurationUtil

- [[#4101](https://github.com/seata/seata/pull/4103)] optimize: optimize AbstractLockManager#collectRowLocks logic
Copy link
Contributor

Choose a reason for hiding this comment

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

4101->4103

Copy link
Contributor

Choose a reason for hiding this comment

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

optimize: 这几个字符删掉,标题不用改

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

changes/1.5.0.md Outdated
@@ -127,6 +127,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#4034](https://github.com/seata/seata/pull/4034)] 优化“优化 Nacos、Consul、Zookeeper、Etcd3 配置(#4019)”的单元测试类
- [[#4055](https://github.com/seata/seata/pull/4055)] 优化NetUtil的getLocalAddress0方法
- [[#4056](https://github.com/seata/seata/pull/4056)] 优化 DurationUtil
- [[#4101](https://github.com/seata/seata/pull/4103)] 减少分支事务注册无需竞争锁时的内存占用
Copy link
Contributor

Choose a reason for hiding this comment

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

4101->4103

Copy link
Contributor

Choose a reason for hiding this comment

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

[[#4101] 内的4101改为4103

@@ -161,8 +162,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [dmego](https://github.com/dmego)
- [zhixing](https://github.com/chenlei3641)
- [siyu](https://github.com/Pinocchio2018)


- [xujj](https://github.com/XBNGit)
Copy link
Contributor

Choose a reason for hiding this comment

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

后面留个空行

@@ -160,7 +160,7 @@
- [dmego](https://github.com/dmego)
- [zhixing](https://github.com/chenlei3641)
- [siyu](https://github.com/Pinocchio2018)

- [xujj](https://github.com/XBNGit)
Copy link
Contributor

Choose a reason for hiding this comment

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

后面留个空行

@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2021

Codecov Report

Merging #4103 (f50ac42) into develop (0c2ae32) will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #4103   +/-   ##
==========================================
  Coverage      49.41%   49.42%           
- Complexity      3751     3753    +2     
==========================================
  Files            700      700           
  Lines          23614    23613    -1     
  Branches        2915     2914    -1     
==========================================
+ Hits           11670    11671    +1     
  Misses         10751    10751           
+ Partials        1193     1191    -2     
Impacted Files Coverage Δ
...java/io/seata/server/lock/AbstractLockManager.java 62.29% <0.00%> (-0.61%) ⬇️
...in/java/io/seata/server/session/GlobalSession.java 80.00% <0.00%> (+0.43%) ⬆️
...o/seata/server/coordinator/DefaultCoordinator.java 49.46% <0.00%> (+0.53%) ⬆️

Copy link
Contributor

@caohdgege caohdgege left a comment

Choose a reason for hiding this comment

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

LGTM

@caohdgege caohdgege merged commit 0e6618c into apache:develop Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The collection may not be in use when a branch transaction registers to acquire the lock
4 participants