fucong.wang
fucong.wang
https://github.com/alibaba/dubbo/blob/17619dfa974457b00fe27cf68ae3f9d266709666/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/LRUCache.java#L22 * LRUCache现在的实现未完成吗, LRU没体现出来啊 * 现在是基于linkedhashmap, 用一个全局锁去guard线程安全, 为什么不采用ConcurrentHashMap的实现方式, 来提高并发呢?
https://github.com/weibocom/motan/blob/2f5cc10db33d25ddf4de73584fb3bf50403e0243/motan-transport-netty/src/main/java/com/weibo/api/motan/transport/netty/StandardThreadExecutor.java#L104 由于没有保证原子性, 这里可能会存在一种情况, 当count+n个task同时提交, 这里产生竞争, count不断增大, 直到count>maxSubmittedTaskCount, super.execute可能一次也没执行
https://github.com/weibocom/motan/blob/2f5cc10db33d25ddf4de73584fb3bf50403e0243/motan-transport-netty/src/main/java/com/weibo/api/motan/transport/netty/NettyChannelHandler.java#L111 how about pipeline.addLast("handler", handler); -> pipeline.addLast(threadPoolExecutor, "handler", handler); ? ctx.executor已经限制ctx内部操作(包括handler)是由该executor执行的, 我们不需要自己去处理吧。