Github user PallaviSingh1992 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/337#discussion_r89041271
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/cache/CacheProvider.java ---
    @@ -84,14 +84,13 @@ public static CacheProvider getInstance() {
         //check if cache is null for given cache type, if null create one
         if (!dictionaryCacheAlreadyExists(cacheType)) {
           synchronized (lock) {
    -        if (!dictionaryCacheAlreadyExists(cacheType)) {
    -          if (null == cacheTypeToLRUCacheMap.get(cacheType)) {
    -            createLRULevelCacheInstance(cacheType);
    -          }
    -          createDictionaryCacheForGivenType(cacheType, carbonStorePath);
    +        if (null == cacheTypeToLRUCacheMap.get(cacheType)) {
    +          createLRULevelCacheInstance(cacheType);
             }
    +        createDictionaryCacheForGivenType(cacheType, carbonStorePath);
    --- End diff --
    
    synchronized blocks synchronized on the same object can only have one 
thread executing inside them at the same time.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to