carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PallaviSingh1992 <...@git.apache.org>
Subject [GitHub] incubator-carbondata pull request #337: [CARBONDATA-428] Removed Redundant C...
Date Tue, 22 Nov 2016 04:21:27 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message