tysonnorris commented on issue #2943: revert LoadBalancerData to be synchronous
URL: 
https://github.com/apache/incubator-openwhisk/pull/2943#issuecomment-357076739
 
 
   @markusthoemmes I tried a new approach which is NOT to merge, but rather 
replace the TrieMap/AtomicIntegers each time the distributed data is updated 
(for activationByInvoker and activationByNamespaceId). 
   
   I added a test in LoadBalancerDataTests ("quickly execute many activations") 
that demonstrates - note that the accuracy of counts fluctuates with 
DistributedData Changed events e.g.:
   
   - TrieMaps are updated locally, with additional updates send to shared data
   - until shared data update is received, TrieMap is accurate for local data, 
but not for cluster data
   - once a shared data update is received, the TrieMap is rebuilt with data 
that is accurate for the cluster, but may overwrite some local state (which 
will arrive with the next cluster update)
   
   Therefore test needs to wait (using Eventually) to receive counts for all 
the activations. 
   
   Some rough testing numbers:
   Running same test on previous (async) code takes 4.5s for 100k activations, 
and on this code takes ~1.2s for 100k activations; Meanwhile 
LocalLoadBalancerData takes ~1s in both cases (as expected). 
   
   Let me know if you think this test is appropriate?   
    

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to