carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackylk <...@git.apache.org>
Subject [GitHub] carbondata pull request #1377: [CARBONDATA-1504] Fixed refresh of segments i...
Date Wed, 27 Sep 2017 14:19:44 GMT
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1377#discussion_r141357648
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMapFactory.java
---
    @@ -120,15 +121,17 @@ public void clear(String segmentId) {
         if (blockIndexes != null) {
           for (TableBlockIndexUniqueIdentifier blockIndex : blockIndexes) {
             DataMap dataMap = cache.getIfPresent(blockIndex);
    -        dataMap.clear();
    -        cache.invalidate(blockIndex);
    +        if (dataMap != null) {
    +          cache.invalidate(blockIndex);
    +          dataMap.clear();
    +        }
           }
         }
       }
     
       @Override
       public void clear() {
    -    for (String segmentId: segmentMap.keySet()) {
    +    for (String segmentId: segmentMap.keySet().toArray(new String[segmentMap.size()]))
{
    --- End diff --
    
    Why this is needed? 


---

Mime
View raw message