-
Notifications
You must be signed in to change notification settings - Fork 56
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
AdmissionControl Split RCA #69
AdmissionControl Split RCA #69
Conversation
Codecov Report
@@ Coverage Diff @@
## main #69 +/- ##
============================================
- Coverage 72.15% 72.11% -0.04%
- Complexity 2928 2942 +14
============================================
Files 371 376 +5
Lines 18627 18680 +53
Branches 1415 1429 +14
============================================
+ Hits 13440 13472 +32
- Misses 4612 4624 +12
- Partials 575 584 +9
Continue to review full report at Codecov.
|
7921123
to
ef38fe2
Compare
"upper-bound": 80, | ||
"threshold": 12.5 | ||
"threshold": 15.0 |
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.
Can we have some comments or more information in the PR's description on how these values are arrived at or more appropriate?
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.
Updated description, and also added in code comments.
return metricValue.get(); | ||
private <M extends Metric> double getMetric(M metric, Field<String> field, String fieldName) { | ||
double response = 0; | ||
for (MetricFlowUnit flowUnit : metric.getFlowUnits()) { |
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.
Can we run as ./gradlew build
as it will fix spotless bugs if any.
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
private static final String small = "small"; | ||
private static final String medium = "medium"; | ||
private static final String large = "large"; |
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.
static final variables names usually follow upper cases. Also can we be more descriptive with the variable name? SMALL_HEAP
?
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
ef38fe2
to
c297942
Compare
In order to avoid issues like rca flowunits not reaching the deciders that we encountered recently, can we add gauntlet tests to confirm that end-to-end workflow is working as expected? Also, please add testing details to the PR. |
/ BYTES_TO_MEGABYTES; | ||
return heapMetrics; | ||
private HeapMetric getHeapMetric() { | ||
double usedHeap = |
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.
Can we name this variables usedHeapInGb?
|
||
private double getThreshold(RangeConfiguration heapRange, double heapPercent) { | ||
Range range = heapRange.getRange(heapPercent); | ||
return Objects.isNull(range) ? 0 : range.getThreshold(); |
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 there are more spotless errors, can we fix them?
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.
Successfully completes ./gradlew build
One major concern I have is LargeHeapRca, MediumHeapRca and SmallHeapRca are inputs to AdmissionControlRca. Currently, we do not have rca's that reference each other directly. We want to have RCAs independent of each other and hook them up if needed using the analysis graph. I think LargeHeapRca, MediumHeapRca and SmallHeapRca are more of utility classes that AdmissionControlRca uses for emitting its status flowunits. If yes, can we make them as util classes. One another alternative is to keep them as RCA's and remove the admission control rca. |
private double getHeapBasedThreshold(double currentHeapPercent) { | ||
Range range = requestSizeHeapRange.getRange(currentHeapPercent); | ||
return Objects.isNull(range) ? 0 : range.getThreshold(); | ||
HeapRca heapRca = HeapRcaFactory.getHeapRca(heapMetric.getMaxHeap()); |
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.
The max heap value is going to stay the same, can we make this as a one time call?
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.
As PA runs outside of ES JVM, reading max heap here as it might change.
Signed-off-by: Mital Awachat <[email protected]>
c297942
to
cacbf30
Compare
* Remove emitting the entry key with the METRICS_WRITE_ERROR metric (#71) Signed-off-by: Sruti Parthiban <[email protected]> * Update commons-io version (#73) Signed-off-by: Sruti Parthiban <[email protected]> * AdmissionControl Split RCA (#69) Signed-off-by: Mital Awachat <[email protected]> Co-authored-by: Mital Awachat <[email protected]> Co-authored-by: Sruti Parthiban <[email protected]> Co-authored-by: Mital Awachat <[email protected]>
Signed-off-by: Mital Awachat [email protected]
Is your feature request related to a problem? Please provide an existing Issue # , or describe.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.