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

[LFUCache]Add frequency of key and delete the empty cache queue #7967

Merged
merged 6 commits into from
Jun 7, 2021

Conversation

iiweniiang
Copy link

@iiweniiang iiweniiang commented Jun 3, 2021

What is the purpose of the change

You can not get frequency of the key or delete the empty cache queue before.

Brief changelog

1.Change the freqTable from Array to TreeMap
2.Add a timeout field to determine if an empty queue can be deleted
3.Add a method to get frequency of the key

Verifying this change

image

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

liwenliang and others added 6 commits June 2, 2021 20:25
2.Add a timeout field to determine if an empty queue can be deleted
2.Add a timeout field to determine if an empty queue can be deleted
3.Add a method to get frequency of the key
2.Add a timeout field to determine if an empty queue can be deleted
3.Add a method to get frequency of the key
@codecov-commenter
Copy link

codecov-commenter commented Jun 4, 2021

Codecov Report

Merging #7967 (c1c5441) into master (ab4ced5) will decrease coverage by 0.01%.
The diff coverage is 73.56%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #7967      +/-   ##
============================================
- Coverage     60.85%   60.84%   -0.02%     
+ Complexity      491      490       -1     
============================================
  Files          1089     1089              
  Lines         43877    43936      +59     
  Branches       6412     6420       +8     
============================================
+ Hits          26703    26734      +31     
- Misses        14210    14235      +25     
- Partials       2964     2967       +3     
Impacted Files Coverage Δ
...n/java/org/apache/dubbo/common/utils/LFUCache.java 80.86% <73.56%> (-5.42%) ⬇️
...che/dubbo/remoting/transport/mina/MinaChannel.java 35.52% <0.00%> (-10.53%) ⬇️
...ng/transport/dispatcher/all/AllChannelHandler.java 89.65% <0.00%> (-6.90%) ⬇️
...in/java/org/apache/dubbo/common/utils/JVMUtil.java 86.79% <0.00%> (-5.67%) ⬇️
.../apache/dubbo/remoting/transport/AbstractPeer.java 58.69% <0.00%> (-4.35%) ⬇️
...ubbo/registry/support/AbstractRegistryFactory.java 83.09% <0.00%> (-2.82%) ⬇️
...pache/dubbo/registry/support/AbstractRegistry.java 77.40% <0.00%> (-2.23%) ⬇️
...ting/zookeeper/curator/CuratorZookeeperClient.java 69.54% <0.00%> (-1.15%) ⬇️
...che/dubbo/common/compiler/support/JdkCompiler.java 63.55% <0.00%> (ø)
...a/org/apache/dubbo/rpc/filter/AccessLogFilter.java 79.10% <0.00%> (ø)
... and 18 more

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 ab4ced5...c1c5441. Read the comment docs.

@iiweniiang iiweniiang changed the title Add frequency of key and delete the empty cache queue [LFUCache]Add frequency of key and delete the empty cache queue Jun 7, 2021
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.

3 participants