[7.x][ML] Remove timeout on waiting for DF analytics result processor to complete (#45724) (#45733)

We cannot know how long the analysis will take to complete thus we should not have
a timeout. Note that if the process crashes, the result processor will pick the
exception due to the stream closing.

Closes #45723
This commit is contained in:
Dimitris Athanasiou 2019-08-20 17:21:40 +03:00 committed by GitHub
parent b37ebd1adf
commit 49edf9e5b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -15,7 +15,6 @@ import org.elasticsearch.xpack.ml.dataframe.process.results.RowResults;
import java.util.Iterator;
import java.util.Objects;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Supplier;
@ -45,12 +44,10 @@ public class AnalyticsResultProcessor {
public void awaitForCompletion() {
try {
if (completionLatch.await(30, TimeUnit.MINUTES) == false) {
LOGGER.warn("[{}] Timeout waiting for results processor to complete", dataFrameAnalyticsId);
}
completionLatch.await();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
LOGGER.info("[{}] Interrupted waiting for results processor to complete", dataFrameAnalyticsId);
LOGGER.error(new ParameterizedMessage("[{}] Interrupted waiting for results processor to complete", dataFrameAnalyticsId), e);
}
}