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


Daren,

when getGuru() is call in a non-initial phase, it may be involved with 
multi-threaded context, I suggest to make it thread-safe
 

    public HypervisorGuru getGuru(HypervisorType hypervisorType) {
58      
        return _hvGurus.get(hypervisorType);
60      
        HypervisorGuru result = _hvGurus.get(hypervisorType);
61      
        
62      
        if ( result == null ) {
63      
            for ( HypervisorGuru guru : _hvGuruList ) {
64      
                if ( guru.getHypervisorType() == hypervisorType ) {
65      
                    _hvGurus.put(hypervisorType, guru);
66      
                    result = guru;
67      
                    break;
68      
                }
69      
            }
70      
        }
71      
        
72      
        return result;
59      
    }
73      

-Kelven

- Kelven Yang


On Sept. 18, 2013, 3:49 p.m., Darren Shepherd wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14190/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2013, 3:49 p.m.)
> 
> 
> Review request for cloudstack, Alex Huang and Kelven Yang.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Various classes are using member injection to inject extensible objects.  
> Really those object should come from an AdapterList that is injected in.  
> This patch switches the code to use setter injection that will later allow 
> spring to inject an AdapterList or something similar to allow extensibility
> 
> 
> Diffs
> -----
> 
>   engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java 
> 24f0795 
>   
> engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
>  204b832 
>   
> plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java
>  d4d73d1 
>   server/src/com/cloud/api/ApiServer.java 550626f 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 17ef6bf 
>   server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java 90273f7 
>   server/src/com/cloud/hypervisor/HypervisorGuruManagerImpl.java 4d1e1b5 
>   server/src/com/cloud/network/NetworkServiceImpl.java eb63fe0 
>   server/src/com/cloud/server/ManagementServerImpl.java c0a52f7 
>   server/src/com/cloud/storage/VolumeApiServiceImpl.java cc99589 
>   server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java 
> d4463d9 
>   server/src/com/cloud/template/TemplateManagerImpl.java e11ac0d 
> 
> Diff: https://reviews.apache.org/r/14190/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Darren Shepherd
> 
>

Reply via email to