Github user KanakaKumar commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2517#discussion_r204456375 --- 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 " --- End diff -- Here actually delete code is added. AtomicFileOperationsImpl is taking care of overwriting temp file even if it exists. So, please correct the message accordingly.
---