Skip to content

[Dubbo-#1362] cache provider always lru cache#1396

Merged
beiwei30 merged 7 commits intoapache:masterfrom
maxiaoguang64:master
Mar 5, 2018
Merged

[Dubbo-#1362] cache provider always lru cache#1396
beiwei30 merged 7 commits intoapache:masterfrom
maxiaoguang64:master

Conversation

@maxiaoguang64
Copy link
Copy Markdown
Contributor

fix #1362

#1362修复
#1362修复
#1362修复
@lovepoem
Copy link
Copy Markdown
Member

lovepoem commented Feb 26, 2018

Please synchronize the origin/master branch to resolve the problem of CI check failure

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 27, 2018

Codecov Report

Merging #1396 into master will decrease coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1396      +/-   ##
==========================================
- Coverage   33.04%   32.94%   -0.11%     
==========================================
  Files         691      691              
  Lines       34625    34625              
  Branches     6851     6850       -1     
==========================================
- Hits        11443    11408      -35     
- Misses      21238    21269      +31     
- Partials     1944     1948       +4
Impacted Files Coverage Δ
...va/com/alibaba/dubbo/cache/filter/CacheFilter.java 73.33% <100%> (ø) ⬆️
...baba/dubbo/cache/support/AbstractCacheFactory.java 100% <100%> (ø) ⬆️
...bo/rpc/cluster/support/FailbackClusterInvoker.java 71.79% <0%> (-12.83%) ⬇️
...om/alibaba/dubbo/rpc/filter/ActiveLimitFilter.java 77.77% <0%> (-11.12%) ⬇️
...ubbo/rpc/protocol/dubbo/ChannelWrappedInvoker.java 41.66% <0%> (-8.34%) ⬇️
...a/dubbo/remoting/transport/netty/NettyChannel.java 61.25% <0%> (-5%) ⬇️
...mon/serialize/support/dubbo/GenericDataOutput.java 66.31% <0%> (-4.92%) ⬇️
...ba/dubbo/remoting/transport/netty/NettyServer.java 67.85% <0%> (-3.58%) ⬇️
...mmon/serialize/support/dubbo/GenericDataInput.java 58.68% <0%> (-2.71%) ⬇️
...bo/remoting/transport/netty/NettyCodecAdapter.java 55.22% <0%> (-1.5%) ⬇️
... and 5 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 84124c4...2f5eaee. Read the comment docs.

@maxiaoguang64
Copy link
Copy Markdown
Contributor Author

@lovepoem All checks have passed, please review it


public Cache getCache(URL url) {
public Cache getCache(URL url, Invocation invocation) {
url = url.addParameter(Constants.METHOD_KEY, invocation.getMethodName());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you attach a testcase for these modified codes, thx.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok, i need some help because i don't know how to test.
l debug in idea run ok.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

you can mock an invocation and cacheFactory,
then assert the result hitting your cache.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

how to confirm use annother cache not lru

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The change looks good, except for this:

url = url.addParameter(Constants.METHOD_KEY, invocation.getMethodName());

I don't think we need addParameter for method name in getCache() method

添加cache的测试用例
@maxiaoguang64
Copy link
Copy Markdown
Contributor Author

@kimmking l add some test for cache, please review it thanks

Copy link
Copy Markdown
Member

@beiwei30 beiwei30 left a comment

Choose a reason for hiding this comment

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

I think I got the point, good job.


public Cache getCache(URL url) {
public Cache getCache(URL url, Invocation invocation) {
url = url.addParameter(Constants.METHOD_KEY, invocation.getMethodName());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The change looks good, except for this:

url = url.addParameter(Constants.METHOD_KEY, invocation.getMethodName());

I don't think we need addParameter for method name in getCache() method

@beiwei30 beiwei30 merged commit d770d92 into apache:master Mar 5, 2018
xpylq pushed a commit to xpylq/dubbo that referenced this pull request Mar 5, 2018
* remotes/upstream/master: (226 commits)
  clean up imports for CacheTest
  [Dubbo-apache#1362] cache provider always lru cache (apache#1396)
  Remove author info and add apache license
  Fix "promoteTransitiveDependencies=false" of maven-shade-plugin
  apache#1411: Locale deserialize 'zh-hant_CN'
  update README format
  update readme to add some details (apache#1403)
  fix number type is lost in yaml config file (apache#1401)
  fix hessian lite test case fail bug (apache#1394)
  Merge pull request apache#1391, fix typo of method name in qos module.
  Fix time unit problem related with FutureAdapter in UT
  Fix time unit problem related with FutureAdapter in UT
  Fix time unit problem in UT
  Fixed apache#1398, revert bugs introduced from apache#1375
  Change Mailing list address
  Merge pull request apache#1242, remove redundant null check.
  Merge pull request apache#1040, refactor: replace some deprecated methods related with jedis.
  Merge pull request apache#1384, fix build string bug.
  Merge pull request apache#1376, do not instantiate load balance if there is no invokers
  Merge pull request apache#1331, add optional parameter to support hessian protocol method overload and request protocol version.
  ...
rolandhe pushed a commit to rolandhe/dubbo that referenced this pull request Sep 9, 2019
* #1362修复

#1362修复

* #1362修复

#1362修复

* #1362修复

#1362修复

* 修改bug

修改bug

* 修改bug

修改bug

* 添加cache的测试用例

添加cache的测试用例
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.

When using method level cache, no matter what i config, it's always LruCache.

5 participants