carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipesala <...@git.apache.org>
Subject [GitHub] carbondata pull request #1019: [CARBONDATA-1156]Improve IUD performance and ...
Date Mon, 12 Jun 2017 13:43:13 GMT
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1019#discussion_r121395234
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/scan/result/iterator/AbstractDetailQueryResultIterator.java
---
    @@ -126,6 +144,82 @@ private void intialiseInfos() {
         }
       }
     
    +  /**
    +   * Below method will be used to get the delete delta rows for a block
    +   *
    +   * @param dataBlock       data block
    +   * @param deleteDeltaInfo delete delta info
    +   * @return blockid+pageid to deleted row mapping
    +   */
    +  private Map<String, DeleteDeltaVo> getDeleteDeltaDetails(AbstractIndex dataBlock,
    +      DeleteDeltaInfo deleteDeltaInfo) {
    +    // if datablock deleted delta timestamp is more then the current delete delta files
timestamp
    +    // then return the current deleted rows
    +    if (dataBlock.getDeleteDeltaTimestamp() >= deleteDeltaInfo
    +        .getLatestDeleteDeltaFileTimestamp()) {
    +      return dataBlock.getDeletedRowsMap();
    +    }
    +    CarbonDeleteFilesDataReader carbonDeleteDeltaFileReader = null;
    +    // get the lock object so in case of concurrent query only one task will read the
delete delta
    +    // files other tasks will wait
    +    Object lockObject = deleteDeltaToLockObjectMap.get(deleteDeltaInfo);
    +    // if lock object is null then add a lock object
    +    if (null == lockObject) {
    +      synchronized (deleteDeltaToLockObjectMap) {
    +        // double checking
    --- End diff --
    
    Again do `deleteDeltaToLockObjectMap.get(deleteDeltaInfo);` to avoid null pointer exception


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