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: skip reload for redis & db mode #4393

Merged
merged 30 commits into from
Mar 12, 2022

Conversation

caohdgege
Copy link
Contributor

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

  1. redis和db模式下,不扫描当前的所有globalsession
  2. file模式下,启动时,Committing和CommitRetrying不进行加锁
  3. 改几个typo,有个线程池没关,一并关闭一下

Ⅱ. Does this pull request fix one issue?

fixes #3537

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@caohdgege caohdgege changed the title optimize: skip reload for redis & db optimize: skip reload for redis & db mode Feb 18, 2022
@funky-eyes funky-eyes added this to the 1.5.0 milestone Feb 21, 2022
@wangliang181230
Copy link
Contributor

wangliang181230 commented Feb 23, 2022

图片

@objcoding objcoding self-requested a review February 28, 2022 16:03
@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2022

Codecov Report

Merging #4393 (00f79ac) into develop (8164311) will decrease coverage by 0.07%.
The diff coverage is 40.67%.

❗ Current head 00f79ac differs from pull request most recent head 9412b10. Consider uploading reports for the commit 9412b10 to get more accurate results

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #4393      +/-   ##
=============================================
- Coverage      48.93%   48.85%   -0.08%     
- Complexity      4003     4006       +3     
=============================================
  Files            730      730              
  Lines          25245    25272      +27     
  Branches        3118     3126       +8     
=============================================
- Hits           12353    12347       -6     
- Misses         11566    11601      +35     
+ Partials        1326     1324       -2     
Impacted Files Coverage Δ
...rc/main/java/io/seata/core/model/GlobalStatus.java 100.00% <ø> (ø)
...o/seata/server/coordinator/DefaultCoordinator.java 44.04% <0.00%> (-6.14%) ⬇️
...in/java/io/seata/server/session/SessionHolder.java 48.27% <35.29%> (-1.73%) ⬇️
...erver/storage/file/session/FileSessionManager.java 56.86% <44.44%> (-1.54%) ⬇️
...n/java/io/seata/rm/datasource/DataSourceProxy.java 54.54% <50.00%> (ø)
...java/io/seata/server/session/SessionCondition.java 93.93% <100.00%> (+9.09%) ⬆️
...in/java/io/seata/server/session/SessionHelper.java 75.28% <100.00%> (+0.56%) ⬆️
...er/src/main/java/io/seata/server/ServerRunner.java 50.00% <0.00%> (-15.39%) ⬇️
... and 2 more

}

if (!StringUtils.isEmpty(condition.getXid())) {
if (!Objects.equals(condition.getXid(), globalSession.getXid())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

同下

Copy link
Contributor

Choose a reason for hiding this comment

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

是同上,这个顺序咋变了。。。。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

啥顺序?

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

Copy link
Contributor

@lightClouds917 lightClouds917 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
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

LGTM

@slievrly slievrly merged commit 90be080 into apache:develop Mar 12, 2022
Bughue pushed a commit to Bughue/seata that referenced this pull request Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

事务Session过多时,TC启动被阻塞一段时间
6 participants