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

bugfix: use Set to avoid duplicate listeners. fixes #1126 #1169

Merged
merged 5 commits into from
Jun 12, 2019
Merged

bugfix: use Set to avoid duplicate listeners. fixes #1126 #1169

merged 5 commits into from
Jun 12, 2019

Conversation

kezhenxu94
Copy link
Member

Ⅰ. Describe what this PR did

This patch replaces ArrayList with HaseSet to avoid duplicated listeners as described in #1126 , and also fix some typos

Ⅱ. Does this pull request fix one issue?

fixes #1126

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

Already have

Ⅳ. Describe how to verify it

CI passes

Ⅴ. Special notes for reviews

null

@codecov-io
Copy link

codecov-io commented Jun 4, 2019

Codecov Report

Merging #1169 into develop will decrease coverage by 0.02%.
The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             develop   #1169      +/-   ##
============================================
- Coverage      43.42%   43.4%   -0.03%     
  Complexity      1428    1428              
============================================
  Files            250     250              
  Lines          10224   10222       -2     
  Branches        1333    1333              
============================================
- Hits            4440    4437       -3     
  Misses          5202    5202              
- Partials         582     583       +1
Impacted Files Coverage Δ Complexity Δ
...in/java/io/seata/server/session/GlobalSession.java 79.8% <83.33%> (-0.2%) 59 <3> (ø)
...server/store/file/FileTransactionStoreManager.java 45.99% <0%> (-0.35%) 19% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9ee5c32...ec73946. Read the comment docs.

Copy link
Contributor

@leizhiyuan leizhiyuan left a comment

Choose a reason for hiding this comment

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

See the comment

@slievrly
Copy link
Member

slievrly commented Jun 5, 2019

See the comment

Is the hashset's order of addition and traversal order consistent? There is currently no order requirement in the business.

@leizhiyuan
Copy link
Contributor

See the comment

Is the hashset's order of addition and traversal order consistent? There is currently no order requirement in the business.

yes,what I mean is the order of hashset, but the method name is 'getSortedBranches' maybe I think that sort it well..

@slievrly
Copy link
Member

slievrly commented Jun 5, 2019

See the comment

Is the hashset's order of addition and traversal order consistent? There is currently no order requirement in the business.

yes,what I mean is the order of hashset, but the method name is 'getSortedBranches' maybe I think that sort it well..

yeah, getSortedBranches need sort, but it's a ArrayList used Array copy method.

@leizhiyuan leizhiyuan self-requested a review June 12, 2019 08:53
Copy link
Contributor

@leizhiyuan leizhiyuan left a comment

Choose a reason for hiding this comment

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

LGTM

@leizhiyuan leizhiyuan merged commit 0071943 into apache:develop Jun 12, 2019
@leizhiyuan leizhiyuan added this to the 0.7.0 milestone Jun 12, 2019
@kezhenxu94 kezhenxu94 deleted the gh/1126 branch June 12, 2019 09:02
@leizhiyuan leizhiyuan modified the milestone: 0.7.0 Jul 10, 2019
nick-tan pushed a commit to nick-tan/seata that referenced this pull request Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There are too many identical SessionLifecycleListener`s in GlobalSession
6 participants