-
Notifications
You must be signed in to change notification settings - Fork 57
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
Handling empty flow unit during Cache/Queue RCA execution #34
Handling empty flow unit during Cache/Queue RCA execution #34
Conversation
// If the RCA receives 3 empty flow units, re-set the 'hasMetric' value | ||
hasEvictions = false; | ||
clearCounter = 0; | ||
LOG.error( |
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.
For some reason if there are only empty flowunits, this might flood the logs. As we are emitting a metric, can we modify the log level to debug?
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.
Good point, let me change the log level to debug.
@@ -217,17 +218,21 @@ public void generateFlowUnitListFromWire(FlowUnitOperationArgWrapper args) { | |||
private static class CacheCollector { | |||
private final Resource cache; | |||
private final Metric cacheMetrics; | |||
private boolean hasMetric; | |||
private boolean hasCacheMetric; |
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 variable with the metric name that it denotes? Like the previous one, hasEvictions
?
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 metric type for ShardRequestCache
can be evictions and hit both. So, kept it generic.
// If the RCA receives 3 empty flow units, re-set the 'hasCacheMetric' value | ||
hasCacheMetric = false; | ||
clearCounter = 0; | ||
LOG.error( |
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.
Same as above, can we make it to debug?
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.
Agreed. Moving it to debug.
**Is your feature request related to a problem? Please provide an existing Issue #33
[RCA] Handle Empty FU within Cache and Queue RCAs
In this case, PA was unable to persist value for 64 metric for the one hour window and thus, RCA was running into Cache_Request_Hit metric table does not exist. Returning null for the metric/dimension and QueryMetric was returning empty Flow units to ShardRequestCacheRCA. The ShardRequestCacheRCA on finding an empty FU, ignores it. This was done to accommodate any delays in metric persistence from PA.
Before this event, the ShardReqestCacheRCA had hasMetric set to true and this variable was not reset during the 1 hour (RCA was ignoring the empty flow units). Thus, the RCA was in Unhealthy state and CacheDecider was repeatedly suggesting ‘ModifyCacheMaxSize’.
This same code is shared across Queue RCA and [FieldDataCacheRca](https://github.com/opensearch-project/performance-analyzer-rca/blob/main/src/main/java/org/opensearch/performanceanalyzer/rca/store/rca/cache/FieldDataCacheRca.java, so we will need to fix this there as well
Describe the solution you are proposing
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
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.