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-3957] Added property to enable disable the repair logic and provide a limit to number of segments in SILoadEventListenerForFailedSegments #3894
Conversation
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2016/ |
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/3757/ |
retest this please |
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/3763/ |
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2023/ |
ac3dd58
to
78c06db
Compare
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/3769/ |
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2027/ |
retest this please |
78c06db
to
559d0b5
Compare
retest this please |
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/3785/ |
Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2043/ |
@kunal642 @VenuReddy2103 @akashrn5 , please review |
* SI table in the FailedSegments listener. | ||
*/ | ||
@CarbonProperty | ||
public static final String CARBON_SI_REPAIR_LIMIT = "carbon.si.repair.limit"; |
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.
-
I think its better to have these 2 properties at table level instead of global.
-
If this is a dynamic conf then add (dynamicConfiguration = true) as the annotation.
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.
done
/** | ||
* Default value for the number of segments to be repaired during SI repair. | ||
*/ | ||
public static final String CARBON_SI_REPAIR_LIMIT_DEFAULT = "1"; |
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.
No need for a default value, if the user has not set then we can go with the existing logic of repairing all the segments
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.
done
return Boolean.parseBoolean(configuredValue); | ||
} | ||
|
||
public int maxSIRepairLimit() { |
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.
rename to "getMaxSIRepairLimit"
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.
done
case loadMetaDetail: LoadMetadataDetails => | ||
if (loadMetaDetail.getSegmentStatus == SegmentStatus.MARKED_FOR_DELETE && | ||
val maxSegmentRepairLimit = CarbonProperties.getInstance().maxSIRepairLimit() | ||
LOGGER.info("Number of Segments to be repaired: " + maxSegmentRepairLimit) |
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.
add tableUniqueName to the log as well
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.
done
559d0b5
to
47decab
Compare
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/3950/ |
Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2210/ |
please add the new properties in docs |
47decab
to
89cbedf
Compare
Added new properties in docs as well |
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2218/ |
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/3958/ |
@vikramahuja1001 please fix the build |
…rty to limit number of segments
89cbedf
to
9e01f2d
Compare
Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2219/ |
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/3959/ |
LGTM |
Why is this PR needed?
In the main table with SI tables after every load/insert command , SILoadEventListenerForFailedSegments.scala checks for missing segments or segments mismatch in SI table and loads the missing/deleted segments to the SI table. In case when there are very large number of missing segments in the SI table(10000's), the repair logic will run for multiple days and will thus block the next load.
What changes were proposed in this PR?
The above mentioned issue is solved using 2 carbon properties.
Does this PR introduce any user interface change?
Is any new testcase added?