Github user DaanHoogland commented on the pull request:

    https://github.com/apache/cloudstack/pull/1532#issuecomment-217829031
  
    @marcaurele @sateesh-chodapuneedi You are both right probably more then I 
will ever be so please take with a grain of salt: 
    ```
        T result = null;
        if (_cache != null) {
            final Element element = _cache.get(id);
            if (element != null) {
                result = (T)element.getObjectValue();
            }
        }
        if(result == null) {
            result = lockRow(id, null);
        }
        return result
    ```
    same pattern would apply to the findIncludingRemoved variety. I think this 
is the cleanest though Marc's version should be semantically equal given a good 
optimising compiler.
    @swill  I will start integration tests on this next.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to