New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CARBONDATA-2749][dataload] In HDFS Empty tablestatus file is written during datalaod, iud or compaction when disk is full. #2517
Conversation
Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6024/ |
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7260/ |
retest SDV please |
SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5903/ |
The failled test case is unrelated and random. |
} | ||
|
||
} | ||
|
||
@Override public void setFailed() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setFailed needs to be raised on Exception cases in the below usages of AtomicFileOperations
- org.apache.carbondata.core.datamap.status.DiskBasedDataMapStatusProvider#writeLoadDetailsIntoFile
- org.apache.carbondata.core.metadata.SegmentFileStore#writeSegmentFile(org.apache.carbondata.core.metadata.SegmentFileStore.SegmentFile, java.lang.String)
- org.apache.carbondata.core.statusmanager.SegmentStatusManager#writeLoadMetadata
Please also handle any other references I missed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
46b253e
to
d3d0484
Compare
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7349/ |
Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6113/ |
retest sdv please |
SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5955/ |
retest sdv please |
} | ||
} else { | ||
LOGGER.warn("The temporary file renaming skipped due to I/O error, deleting file " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here actually delete code is added. AtomicFileOperationsImpl is taking care of overwriting temp file even if it exists. So, please correct the message accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KanakaKumar Thanks for the review.
Actually when the delete fails the temp file will persists and its better to delete it at the same time, to avoid problem in secure environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok fine.
SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5966/ |
d3d0484
to
843fd9c
Compare
LGTM |
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7450/ |
Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6207/ |
SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5982/ |
69c253f
to
cd03a27
Compare
Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7489/ |
Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6247/ |
678f529
to
e49c4ca
Compare
Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7499/ |
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7504/ |
Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6261/ |
retest sdv please |
1 similar comment
retest sdv please |
retest sdv please |
SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6001/ |
retest sdv please |
SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6012/ |
retest sdv please |
@@ -724,6 +724,7 @@ public void writeLoadDetailsIntoFile(List<SegmentUpdateDetails> listOfSegmentUpd | |||
brWriter.write(metadataInstance); | |||
} catch (IOException ioe) { | |||
LOG.error("Error message: " + ioe.getLocalizedMessage()); | |||
fileWrite.setFailed(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some places IO exception is thrown back after setting the flag and some places exception is not thrown..any specific reason for this?...can we keep the behavior same..better to throw back the exception at all places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manishgupta88 Thanks for the review.
Agreed with your point eating exception is not a good idea, handled throwing back at all the places.
… during datalaod, iud or compaction when disk is full.
e49c4ca
to
af06cb7
Compare
SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6025/ |
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7572/ |
Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6330/ |
SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6038/ |
LGTM. The failures in 2.2.1 build are note related to this PR. Those are failing on master as well. Need to fix. |
during datalaod, iud or compaction when disk is full. Problem: When a failure happens due to disk full during load, IUD or Compaction, then while updating the tablestatus file, the tablestaus.tmp file during atomic file operation remains empty, and in the finally block the empty tablestaus.tmp file is getting renamed to the actual file. This leads to empty tablestatus file. Once such problem happens the tablestatus file can not be retrieved and the already loaded data can be used. Solution: If the failures happens during write then the the schema rename in the finally block must be avoided. This closes #2517
during datalaod, iud or compaction when disk is full. Problem: When a failure happens due to disk full during load, IUD or Compaction, then while updating the tablestatus file, the tablestaus.tmp file during atomic file operation remains empty, and in the finally block the empty tablestaus.tmp file is getting renamed to the actual file. This leads to empty tablestatus file. Once such problem happens the tablestatus file can not be retrieved and the already loaded data can be used. Solution: If the failures happens during write then the the schema rename in the finally block must be avoided. This closes apache#2517
Problem:
When a failure happens due to disk full during load, IUD or Compaction, then while updating the tablestatus file, the tablestaus.tmp file during atomic file operation remains empty, and in the finally block the empty tablestaus.tmp file is getting renamed to the actual file. This leads to empty tablestatus file. Once such problem happens the tablestatus file can not be retrieved and the already loaded data can be used.
Solution:
If the failures happens during write then the the schema rename in the finally
block must be avoided.
Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:
NA
NA
NA
Please provide details on
- Whether new unit test cases have been added or why no new tests are required?
- How it is tested? Please attach test report.
- Is it a performance related change? Please attach the performance test report.
- Any additional information to help reviewers in testing this change.
NA
NA