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

    https://github.com/apache/carbondata/pull/2534#discussion_r204287026
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java ---
    @@ -597,7 +597,14 @@ public SegmentFile getSegmentFile() {
               Set<String> files = entry.getValue().getFiles();
               if (null != files && !files.isEmpty()) {
                 for (String indexFile : files) {
    -              indexFiles.put(location + 
CarbonCommonConstants.FILE_SEPARATOR + indexFile, null);
    +              String indexFilePath = location + 
CarbonCommonConstants.FILE_SEPARATOR + indexFile;
    +              try {
    +                if (FileFactory.isFileExist(indexFilePath)) {
    +                  indexFiles.put(indexFilePath, null);
    +                }
    +              } catch (IOException e) {
    +                LOGGER.error(e.getMessage());
    --- End diff --
    
    1. Don't LOG the error here, throw IO exception back to caller
    2. Mention the compatibility version number and provide a detailed comment 
in this method for file Existence check including the version numbers


---

Reply via email to