Skip to content

Commit 35bde91

Browse files
authored
Revert "[ML] unmuting test for issue/53007 and adding logging (#53053)" (#53080)
This reverts commit 373d180.
1 parent 999f934 commit 35bde91

File tree

5 files changed

+3
-28
lines changed

5 files changed

+3
-28
lines changed

x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/RunDataFrameAnalyticsIT.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import org.elasticsearch.action.index.IndexRequest;
1515
import org.elasticsearch.action.search.SearchResponse;
1616
import org.elasticsearch.action.support.WriteRequest;
17-
import org.elasticsearch.common.settings.Settings;
1817
import org.elasticsearch.common.unit.ByteSizeUnit;
1918
import org.elasticsearch.common.unit.ByteSizeValue;
2019
import org.elasticsearch.common.xcontent.XContentType;
@@ -49,12 +48,6 @@ public class RunDataFrameAnalyticsIT extends MlNativeDataFrameAnalyticsIntegTest
4948
@After
5049
public void cleanup() {
5150
cleanUp();
52-
client().admin().cluster()
53-
.prepareUpdateSettings()
54-
.setTransientSettings(Settings.builder()
55-
.putNull("logger.org.elasticsearch.xpack.ml.action")
56-
.putNull("logger.org.elasticsearch.xpack.ml.dataframe"))
57-
.get();
5851
}
5952

6053
public void testOutlierDetectionWithFewDocuments() throws Exception {
@@ -273,14 +266,9 @@ public void testOutlierDetectionWithMoreFieldsThanDocValueFieldLimit() throws Ex
273266
"Finished analysis");
274267
}
275268

269+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/53007")
276270
public void testStopOutlierDetectionWithEnoughDocumentsToScroll() throws Exception {
277271
String sourceIndex = "test-stop-outlier-detection-with-enough-docs-to-scroll";
278-
client().admin().cluster()
279-
.prepareUpdateSettings()
280-
.setTransientSettings(Settings.builder()
281-
.put("logger.org.elasticsearch.xpack.ml.action", "DEBUG")
282-
.put("logger.org.elasticsearch.xpack.ml.dataframe", "DEBUG"))
283-
.get();
284272

285273
client().admin().indices().prepareCreate(sourceIndex)
286274
.setMapping("numeric_1", "type=double", "numeric_2", "type=float", "categorical_1", "type=keyword")

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStartDataFrameAnalyticsAction.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ protected void masterOperation(Task task, StartDataFrameAnalyticsAction.Request
163163
new ActionListener<PersistentTasksCustomMetaData.PersistentTask<StartDataFrameAnalyticsAction.TaskParams>>() {
164164
@Override
165165
public void onResponse(PersistentTasksCustomMetaData.PersistentTask<StartDataFrameAnalyticsAction.TaskParams> task) {
166-
logger.debug("[{}] waiting for task to start", task.getParams().getId());
167166
waitForAnalyticsStarted(task, request.getTimeout(), listener);
168167
}
169168

@@ -398,7 +397,6 @@ public void onResponse(PersistentTasksCustomMetaData.PersistentTask<PersistentTa
398397
// what would have happened if the error had been detected in the "fast fail" validation
399398
cancelAnalyticsStart(task, predicate.exception, listener);
400399
} else {
401-
logger.debug("[{}] task is now started", task.getParams().getId());
402400
auditor.info(task.getParams().getId(), Messages.DATA_FRAME_ANALYTICS_AUDIT_STARTED);
403401
listener.onResponse(new AcknowledgedResponse(true));
404402
}

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStopDataFrameAnalyticsAction.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ private String[] findAllocatedNodesAndRemoveUnassignedTasks(Set<String> analytic
193193
// This means the task has not been assigned to a node yet so
194194
// we can stop it by removing its persistent task.
195195
// The listener is a no-op as we're already going to wait for the task to be removed.
196-
logger.debug("[{}] sending remove request", task.getId());
197196
persistentTasksService.sendRemoveRequest(task.getId(), ActionListener.wrap(r -> {}, e -> {}));
198197
}
199198
}
@@ -267,7 +266,6 @@ void waitForTaskRemoved(Set<String> analyticsIds, StopDataFrameAnalyticsAction.R
267266
filterPersistentTasks(persistentTasks, analyticsIds).isEmpty(),
268267
request.getTimeout(), ActionListener.wrap(
269268
booleanResponse -> {
270-
logger.debug("[{}] analytics is stopped.", request.getId());
271269
auditor.info(request.getId(), Messages.DATA_FRAME_ANALYTICS_AUDIT_STOPPED);
272270
listener.onResponse(response);
273271
},

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/dataframe/DataFrameAnalyticsManager.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,24 +105,17 @@ public void execute(DataFrameAnalyticsTask task, DataFrameAnalyticsState current
105105

106106
// Retrieve configuration
107107
ActionListener<Boolean> statsIndexListener = ActionListener.wrap(
108-
aBoolean -> {
109-
LOGGER.debug("[{}] created .ml-stats index", task.getParams().getId());
110-
configProvider.get(task.getParams().getId(), configListener);
111-
},
108+
aBoolean -> configProvider.get(task.getParams().getId(), configListener),
112109
configListener::onFailure
113110
);
114111

115112
// Make sure the stats index and alias exist
116113
ActionListener<Boolean> stateAliasListener = ActionListener.wrap(
117-
aBoolean -> {
118-
LOGGER.debug("[{}] created .ml-state index. Starting to create/update .ml-stats index", task.getParams().getId());
119-
createStatsIndexAndUpdateMappingsIfNecessary(clusterState, statsIndexListener);
120-
},
114+
aBoolean -> createStatsIndexAndUpdateMappingsIfNecessary(clusterState, statsIndexListener),
121115
configListener::onFailure
122116
);
123117

124118
// Make sure the state index and alias exist
125-
LOGGER.debug("[{}] Starting to create/update .ml-state index", task.getParams().getId());
126119
AnomalyDetectorsIndex.createStateIndexAndAliasIfNecessary(client, clusterState, expressionResolver, stateAliasListener);
127120
}
128121

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/dataframe/DataFrameAnalyticsTask.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ public void markAsFailed(Exception e) {
130130
}
131131

132132
public void stop(String reason, TimeValue timeout) {
133-
LOGGER.debug("[{}] stop called with reason [{}]", taskParams.getId(), reason);
134133
isStopping = true;
135134

136135
ActionListener<Void> reindexProgressListener = ActionListener.wrap(
@@ -147,7 +146,6 @@ public void stop(String reason, TimeValue timeout) {
147146
}
148147

149148
private void doStop(String reason, TimeValue timeout) {
150-
LOGGER.debug("[{}] doStop called with reason [{}] and reindexTaskId [{}]", taskParams.getId(), reason, reindexingTaskId);
151149
if (reindexingTaskId != null) {
152150
cancelReindexingTask(reason, timeout);
153151
}

0 commit comments

Comments
 (0)