diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java index 556f772eecf..53070c2de2c 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java @@ -165,6 +165,7 @@ class DatafeedJob { DataCounts counts; try (InputStream in = extractedData.get()) { counts = postData(in, XContentType.JSON); + LOGGER.trace("[{}] Processed another {} records", jobId, counts.getProcessedRecordCount()); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); @@ -190,6 +191,8 @@ class DatafeedJob { } lastEndTimeMs = Math.max(lastEndTimeMs == null ? 0 : lastEndTimeMs, end - 1); + LOGGER.debug("[{}] Complete iterating data extractor [{}], [{}], [{}], [{}], [{}]", jobId, error, recordCount, + lastEndTimeMs, isRunning(), dataExtractor.isCancelled()); // We can now throw any stored error as we have updated time. if (error != null) { @@ -235,6 +238,7 @@ class DatafeedJob { private void flushJob(FlushJobAction.Request flushRequest) { try { + LOGGER.trace("[" + jobId + "] Sending flush request"); client.execute(FlushJobAction.INSTANCE, flushRequest).actionGet(); } catch (Exception e) { LOGGER.debug("[" + jobId + "] error while flushing job", e); diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java index 18e70e13d07..9e9da2818dd 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java @@ -53,7 +53,7 @@ public class MlDistributedFailureIT extends BaseMlIntegTestCase { } @TestLogging("org.elasticsearch.xpack.ml.action:DEBUG,org.elasticsearch.xpack.persistent:TRACE," + - "org.elasticsearch.cluster.service:TRACE") + "org.elasticsearch.xpack.ml.datafeed:TRACE") public void testLoseDedicatedMasterNode() throws Exception { internalCluster().ensureAtMostNumDataNodes(0); logger.info("Starting dedicated master node...");