You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
Is your feature request related to a problem? Please describe.
We don't guarantee there is one query running for each detector any more. This is the old change #54. Since then, we have moved away from the old code path.
define a SearchOperationListener such that index operations are delayed to simulate long running queries;
create a fake plugin to use listener defined in 1)
add AD plugin and the fake plugin together
... automate what we did on manual testing ..
so 3 parts of the change:
modify current SearchFeatureDao.getFeaturesForPeriod and SearchFeatureDao.getFeatureSamplesForPeriodsto use ClientUtil.asyncRequest and add a parameter to indicate if the query is cancellable or not.
add cancel mechanism in ClientUtil.asyncRequest similar to Hanguang's PR.
write an integ test
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
We don't guarantee there is one query running for each detector any more. This is the old change #54. Since then, we have moved away from the old code path.
Describe the solution you'd like
Hanguang’s change only covers throttledTimeRequest: https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/master/src/main/java/com/amazon/opendistroforelasticsearch/ad/feature/SearchFeatureDao.java#L153
Now getFeaturesForPeriod is deprecated: https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/master/src/main/java/com/amazon/opendistroforelasticsearch/ad/feature/SearchFeatureDao.java#L147
We use https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/master/src/main/java/com/amazon/opendistroforelasticsearch/ad/feature/SearchFeatureDao.java#L165 and https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/master/src/main/java/com/amazon/opendistroforelasticsearch/ad/feature/SearchFeatureDao.java#L202
We want to change https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/master/src/main/java/com/amazon/opendistroforelasticsearch/ad/feature/SearchFeatureDao.java#L168 and https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/master/src/main/java/com/amazon/opendistroforelasticsearch/ad/feature/SearchFeatureDao.java#L209 so that we use https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/master/src/main/java/com/amazon/opendistroforelasticsearch/ad/util/ClientUtil.java#L125
https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/master/src/main/java/com/amazon/opendistroforelasticsearch/ad/feature/SearchFeatureDao.java#L202 is used in each detector run and cold start. We don't want to cancel query if it is for cold start since it is one time thing. We probably want to add a parameter to getFeatureSamplesForPeriods to indicate if the query should be cancelled or not. Say if it is used for cold start, then the parameter is false.
And add cacnel query mechanism in https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/master/src/main/java/com/amazon/opendistroforelasticsearch/ad/util/ClientUtil.java#L125 similar to https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/master/src/main/java/com/amazon/opendistroforelasticsearch/ad/util/ClientUtil.java#L85-L115
Also, we want to add an ESIntegTestCase where we
so 3 parts of the change:
The text was updated successfully, but these errors were encountered: