From c3c1dcd2ac62c7a2bef38604cb1a64464f9afb0f Mon Sep 17 00:00:00 2001 From: Benjamin Trent Date: Tue, 3 Sep 2019 15:26:56 -0500 Subject: [PATCH] [ML][Transforms] fixing listener being called twice (#46284) (#46292) --- .../xpack/dataframe/transforms/DataFrameTransformTask.java | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugin/data-frame/src/main/java/org/elasticsearch/xpack/dataframe/transforms/DataFrameTransformTask.java b/x-pack/plugin/data-frame/src/main/java/org/elasticsearch/xpack/dataframe/transforms/DataFrameTransformTask.java index 0515640f2ba..fce51ac45de 100644 --- a/x-pack/plugin/data-frame/src/main/java/org/elasticsearch/xpack/dataframe/transforms/DataFrameTransformTask.java +++ b/x-pack/plugin/data-frame/src/main/java/org/elasticsearch/xpack/dataframe/transforms/DataFrameTransformTask.java @@ -980,6 +980,7 @@ public class DataFrameTransformTask extends AllocatedPersistentTask implements S // So, don't treat this like a checkpoint being completed, as no work was done. if (hasSourceChanged == false) { listener.onResponse(null); + return; } // TODO: needs cleanup super is called with a listener, but listener.onResponse is called below // super.onFinish() fortunately ignores the listener