-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50089/#review142456
-----------------------------------------------------------



I'm afraid that your changes alter the return value of these methods.  They're 
only supposed to return keys that were newly registered.  CacheClientProxy 
checks the return value to see if it should invoke registration-listeners.  
With your changes it will always think that all of the keys were newly 
registered and will always invoke listeners with the full set of keys.  I think 
you need something more like this:

keysRegistered = new HashSet(keys);
keysRegistered.removeAll(interestList.getSnapshot());
interestList.addAll(keys);

- Bruce Schuchardt


On July 15, 2016, 10:14 p.m., anilkumar gingade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50089/
> -----------------------------------------------------------
> 
> (Updated July 15, 2016, 10:14 p.m.)
> 
> 
> Review request for geode, anilkumar gingade, Barry Oglesby, Bruce Schuchardt, 
> Jason Huynh, Lynn Hughes-Godfrey, Lynn Gallinat, William Markito, nabarun 
> nag, Dan Smith, and xiaojian zhou.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> GEODE-1669: Performance issue with Interest registration with impact on 
> client side event processing
> 
> This is in relation to internal ticket GEM-437.
> 
> The client interests are managed in "FilterProfile" class on server side. 
> These are maintained using the concurrent data structures CopyOnWriteHashSet 
> and CopyOnWriteHashMap...
> 
> When set of keys are registered from client, the keys are added to 
> CopyOnWriteHashSet one by one (FilterProfile.registerClientInterestList()); 
> Where a new HashSet is created each time when an entry is added, which could 
> impact performance based on the number of keys registered.
> 
> This will have implication on the client side event processing; as the event 
> processing gets blocked when a interest registration is in progress by other 
> thread.
> 
> Change/Solution:
> 
> Instead of adding the keys one by one; the keys are added using addAll(). 
> This avoids creating one hashset per interest key, which was making the 
> registration process to take longer time.
> 
> 
> Diffs
> -----
> 
>   
> geode-core/src/main/java/com/gemstone/gemfire/internal/cache/FilterProfile.java
>  08a6484 
> 
> Diff: https://reviews.apache.org/r/50089/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> anilkumar gingade
> 
>

Reply via email to