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

Allow repeatable deletions and enhance thread safety #3069

Merged
merged 3 commits into from
May 16, 2020
Merged

Allow repeatable deletions and enhance thread safety #3069

merged 3 commits into from
May 16, 2020

Conversation

figroc
Copy link
Contributor

@figroc figroc commented May 9, 2020

What's the purpose of this PR

fix two bugs in mockserver

  • repeatable deletion of properties is erroneous
  • there would be race condition issue on override properties

Which issue(s) this PR fixes:

Fixes #3064

Brief changelog

  • change immutable set to concurrent hash set
  • change plain hash map to concurrent map

@nobodyiam
Copy link
Member

Thanks! Would you please add a test for repeatable deletions so that it would be protected in the future?

@codecov-io
Copy link

Codecov Report

Merging #3069 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3069      +/-   ##
============================================
+ Coverage     51.30%   51.31%   +0.01%     
- Complexity     2234     2235       +1     
============================================
  Files           432      432              
  Lines         13383    13385       +2     
  Branches       1375     1375              
============================================
+ Hits           6866     6869       +3     
  Misses         6042     6042              
+ Partials        475      474       -1     
Impacted Files Coverage Δ Complexity Δ
...ip/framework/apollo/mockserver/EmbeddedApollo.java 90.36% <100.00%> (+0.23%) 18.00 <0.00> (ø)
...ervice/service/ReleaseMessageServiceWithCache.java 87.05% <0.00%> (+1.17%) 25.00% <0.00%> (+1.00%)

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 4d56835...d8e5b57. Read the comment docs.

@figroc
Copy link
Contributor Author

figroc commented May 13, 2020

@nobodyiam tests added

Copy link
Member

@nobodyiam nobodyiam left a comment

Choose a reason for hiding this comment

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

LGTM

@nobodyiam nobodyiam merged commit 0478122 into apolloconfig:master May 16, 2020
Anilople added a commit to Anilople/apollo that referenced this pull request May 17, 2020
Allow repeatable deletions and enhance thread safety (apolloconfig#3069)
LimTerran added a commit to LimTerran/apollo that referenced this pull request May 20, 2020
Allow repeatable deletions and enhance thread safety (apolloconfig#3069)
@nobodyiam nobodyiam added this to the 1.7.0 milestone Jun 25, 2020
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.

EmbeddedApollo: 非首次 deleteProperty 失败
3 participants