carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvramana <...@git.apache.org>
Subject [GitHub] carbondata pull request #1008: [CARBONDATA-1145] Fix single-pass issue for m...
Date Wed, 14 Jun 2017 15:36:04 GMT
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1008#discussion_r121982426
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/dictionary/generator/IncrementalColumnDictionaryGenerator.java
---
    @@ -169,10 +172,22 @@ public IncrementalColumnDictionaryGenerator(CarbonDimension dimension,
int maxVa
           }
           // write value to dictionary file
           if (reverseIncrementalCache.size() > 0) {
    -        for (int index = 2; index < reverseIncrementalCache.size() + 2; index++) {
    -          String value = reverseIncrementalCache.get(index);
    +        String[] values = null;
    +        synchronized (lock) {
    +          // collect incremental dictionary
    +          values = new String[currentDictionarySize - maxValue];
    --- End diff --
    
    Why it is collected to temporary list, why not directly write inside lock?


---
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