GitHub user akashrn5 opened a pull request:
https://github.com/apache/carbondata/pull/1793 [CARBONDATA-2021]fix clean up issue when update operation is abprutly stopped when delete is success and update is failed while writing status file then a stale carbon data file is created. so removing that file on clean up . and also not considering that one during query. =>when the update operation is running and the user stops it abruptly, then the carbon data file will be remained in the store . so extra data is coming. =>so during the next update the clean up of the files need to be handled. and in query also new data file should be excluded. Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [x] Any interfaces changed? NA - [x] Any backward compatibility impacted? NA - [x] Document update required? NA - [x] Testing done manual testing 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. - [x] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. NA You can merge this pull request into a Git repository by running: $ git pull https://github.com/akashrn5/incubator-carbondata update_abrupt Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/1793.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1793 ---- commit 8983ce1cdeaf89c1f2e79f259a2f796a996fffd9 Author: akashrn5 <akashnilugal@...> Date: 2018-01-10T14:59:43Z fix clean up issue when update operation is abprutly stopped ---- --- |
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1793 Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1468/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1793 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2701/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1793 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2836/ --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1793#discussion_r161243097 --- Diff: core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java --- @@ -427,6 +427,10 @@ public static void cleanUpDeltaFiles(CarbonTable table, boolean forceDelete) { String validUpdateStatusFile = ""; + final boolean getOnlyAbortedFiles = true; --- End diff -- Why do you need a final local variable? --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1793 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2813/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1793 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1578/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1793 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2903/ --- |
In reply to this post by qiuchenjian-2
Github user akashrn5 commented on the issue:
https://github.com/apache/carbondata/pull/1793 retest this please --- |
In reply to this post by qiuchenjian-2
Github user akashrn5 commented on the issue:
https://github.com/apache/carbondata/pull/1793 retest sdv please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1793 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1590/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1793 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2825/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1793 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2913/ --- |
In reply to this post by qiuchenjian-2
|
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1793#discussion_r161985530 --- Diff: core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java --- @@ -558,6 +576,36 @@ public static void cleanUpDeltaFiles(CarbonTable table, boolean forceDelete) { } } + /** + * @param segment --- End diff -- please complete the comment to describe this function --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1793#discussion_r161985749 --- Diff: core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java --- @@ -427,6 +427,10 @@ public static void cleanUpDeltaFiles(CarbonTable table, boolean forceDelete) { String validUpdateStatusFile = ""; + boolean getOnlyAbortedFiles = true; --- End diff -- It is hard to understand a Boolean variable with name start with `get`, can you rename it `isXXX` and add comment for it. The same for below variable --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1793#discussion_r161987134 --- Diff: core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java --- @@ -956,9 +964,16 @@ public UpdateVO getInvalidTimestampRange(String segmentId) { long timestamp = CarbonUpdateUtil.getTimeStampAsLong( CarbonTablePath.DataFileUtil.getTimeStampFromDeleteDeltaFile(fileName)); - if (block.getBlockName().equalsIgnoreCase(blkName) && ( - Long.compare(timestamp, deltaStartTimestamp) < 0)) { - files.add(eachFile); + if (block.getBlockName().equalsIgnoreCase(blkName)) { + + if (getOnlyAbortedFiles) { + if (Long.compare(timestamp, deltaEndTimestamp) > 0) { --- End diff -- Can't you use timestamp > deltaEndTimestamp? --- |
In reply to this post by qiuchenjian-2
Github user akashrn5 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1793#discussion_r161996456 --- Diff: core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java --- @@ -956,9 +964,16 @@ public UpdateVO getInvalidTimestampRange(String segmentId) { long timestamp = CarbonUpdateUtil.getTimeStampAsLong( CarbonTablePath.DataFileUtil.getTimeStampFromDeleteDeltaFile(fileName)); - if (block.getBlockName().equalsIgnoreCase(blkName) && ( - Long.compare(timestamp, deltaStartTimestamp) < 0)) { - files.add(eachFile); + if (block.getBlockName().equalsIgnoreCase(blkName)) { + + if (getOnlyAbortedFiles) { + if (Long.compare(timestamp, deltaEndTimestamp) > 0) { --- End diff -- yes, but for all the timestamp comparision in code, we were using Long.compare, so i follwed the same , just to make same for all --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1793 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2887/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1793 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1654/ --- |
Free forum by Nabble | Edit this page |