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: Removed Reloadable from the redis/db SessionManager. #2843

Merged

Conversation

wangliang181230
Copy link
Contributor

Ⅰ. Describe what this PR did

从redis和db模式的SessionManager中移除Reloadable接口实现。因为它们并不需要reload。

从PR #2828 拆分出来的。

Ⅱ. Does this pull request fix one issue?

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Jun 29, 2020

Codecov Report

Merging #2843 into develop will decrease coverage by 0.00%.
The diff coverage is 53.19%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2843      +/-   ##
=============================================
- Coverage      50.57%   50.57%   -0.01%     
- Complexity      3105     3107       +2     
=============================================
  Files            599      599              
  Lines          19510    19528      +18     
  Branches        2406     2410       +4     
=============================================
+ Hits            9868     9877       +9     
- Misses          8650     8657       +7     
- Partials         992      994       +2     
Impacted Files Coverage Δ Complexity Δ
...ver/storage/db/session/DataBaseSessionManager.java 36.84% <ø> (+0.63%) 12.00 <0.00> (ø)
...ver/storage/redis/session/RedisSessionManager.java 29.82% <ø> (+0.51%) 8.00 <0.00> (ø)
...in/java/io/seata/server/session/SessionHolder.java 50.00% <53.19%> (-1.12%) 22.00 <9.00> (+4.00) ⬇️

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

@lj2018110133 lj2018110133 left a comment

Choose a reason for hiding this comment

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

LGTM

@l81893521 l81893521 added the module/server server module label Jul 16, 2020
@l81893521 l81893521 added this to the 1.4.0 milestone Jul 16, 2020
@wangliang181230 wangliang181230 changed the title optimize: Removed Reloadable from the redis/db SessionManager. [#2828-2] optimize: Removed Reloadable from the redis/db SessionManager. Jul 17, 2020
@wangliang181230 wangliang181230 changed the title [#2828-2] optimize: Removed Reloadable from the redis/db SessionManager. optimize: Removed Reloadable from the redis/db SessionManager. Jul 30, 2020
}
break;
case AsyncCommitting:
if (storeMode == StoreMode.FILE) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why only file mode can reload this status of global session?

AsyncCommitting
CommitRetrying
TimeoutRollbackRetrying
Begin

Copy link
Contributor

Choose a reason for hiding this comment

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

If say so, this hold method just use for file mode?

@codecov-io
Copy link

codecov-io commented Oct 12, 2020

Codecov Report

Merging #2843 into develop will decrease coverage by 0.00%.
The diff coverage is 55.31%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2843      +/-   ##
=============================================
- Coverage      51.04%   51.03%   -0.01%     
- Complexity      3259     3261       +2     
=============================================
  Files            609      609              
  Lines          20027    20045      +18     
  Branches        2501     2504       +3     
=============================================
+ Hits           10222    10230       +8     
- Misses          8788     8795       +7     
- Partials        1017     1020       +3     
Impacted Files Coverage Δ Complexity Δ
...ver/storage/db/session/DataBaseSessionManager.java 36.84% <ø> (+0.63%) 12.00 <0.00> (ø)
...ver/storage/redis/session/RedisSessionManager.java 29.82% <ø> (+0.51%) 10.00 <0.00> (ø)
...in/java/io/seata/server/session/SessionHolder.java 50.90% <55.31%> (-0.21%) 22.00 <9.00> (+4.00) ⬇️
...o/seata/server/coordinator/DefaultCoordinator.java 54.63% <0.00%> (-0.52%) 28.00% <0.00%> (-1.00%)
...in/java/io/seata/server/session/GlobalSession.java 82.72% <0.00%> (-0.46%) 70.00% <0.00%> (-1.00%)

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

@wangliang181230 wangliang181230 changed the title optimize: Removed Reloadable from the redis/db SessionManager. [WIP:需再优化一下file的reload方法,避免垃圾数据导致内存溢出] optimize: Removed Reloadable from the redis/db SessionManager. Oct 22, 2020
@wangliang181230 wangliang181230 changed the title [WIP:需再优化一下file的reload方法,避免垃圾数据导致内存溢出] optimize: Removed Reloadable from the redis/db SessionManager. [WIP:需再优化一下file的reload方法,避免垃圾数据堆积导致启动时内存溢出] optimize: Removed Reloadable from the redis/db SessionManager. Oct 22, 2020
@wangliang181230 wangliang181230 changed the title [WIP:需再优化一下file的reload方法,避免垃圾数据堆积导致启动时内存溢出] optimize: Removed Reloadable from the redis/db SessionManager. optimize: Removed Reloadable from the redis/db SessionManager. Oct 22, 2020
Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

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

LGTM

@l81893521 l81893521 merged commit 027197c into apache:develop Oct 28, 2020
@wangliang181230 wangliang181230 deleted the optimize-redis-db-session-manager-2 branch October 28, 2020 09:22
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.

None yet

7 participants