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

    https://github.com/apache/carbondata/pull/2517#discussion_r203957912
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/fileoperations/AtomicFileOperationsImpl.java
 ---
    @@ -70,12 +78,20 @@ public AtomicFileOperationsImpl(String filePath, 
FileType fileType) {
         if (null != dataOutStream) {
           CarbonUtil.closeStream(dataOutStream);
           CarbonFile tempFile = FileFactory.getCarbonFile(tempWriteFilePath, 
fileType);
    -      if (!tempFile.renameForce(filePath)) {
    -        throw new IOException("temporary file renaming failed, src="
    -            + tempFile.getPath() + ", dest=" + filePath);
    +      if (!this.setFailed) {
    +        if (!tempFile.renameForce(filePath)) {
    +          throw new IOException(
    +              "temporary file renaming failed, src=" + tempFile.getPath() 
+ ", dest=" + filePath);
    +        }
           }
    +    } else {
    +      LOGGER.warn("The temporary file renaming skipped due to I/O error, 
deleting file "
    +          + tempWriteFilePath);
         }
     
       }
     
    +  @Override public void setFailed() {
    --- End diff --
    
    Fixed


---

Reply via email to