dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] YoungHu opened a new issue #2233: ReferenceConfigCache doesn't work well when no provider
Date Mon, 13 Aug 2018 07:30:03 GMT
YoungHu opened a new issue #2233: ReferenceConfigCache doesn't work well when no provider
URL: https://github.com/apache/incubator-dubbo/issues/2233
 
 
   - [x] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of
this repository and believe that this is not a duplicate.
   - [x] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md)
of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 2.6.2 and lower
   * Operating System version: all version
   * Java version: all version
   
   ### Step to reproduce this issue
   
   1. shutdown provider
   2. consumer side use ReferenceConfigCache.get() to cache reference
   3. invoke provider with just one time
   4. startup provider
   5. invoker provider again
   
   Pls. provide [GitHub address] to reproduce this issue.
   
   ### Expected Result
   
   when provider startup, consumer will invoke sucess
   
   ### Actual Result
   
   actual invoke failed
   
   ### What cause it
   When no provider config.get return null, at this time we shouldn't store this reference
into cache.
   
   ```java
   public <T> T get(ReferenceConfig<T> referenceConfig) {
           String key = generator.generateKey(referenceConfig);
   
           ReferenceConfig<?> config = cache.get(key);
           if (config != null) {
               return (T) config.get();
           }
   
           cache.putIfAbsent(key, referenceConfig);
           config = cache.get(key);
           return (T) config.get();
       }
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Mime
View raw message