Skip to content

Commit 3dcd773

Browse files
jan-elasticdavidkyle
authored andcommitted
Don't close/recreate adaptive allocations metrics (#114721)
1 parent 86bd8c9 commit 3dcd773

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/inference/adaptiveallocations/AdaptiveAllocationsScalerService.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,6 @@ Collection<DoubleWithAttributes> observeDouble(Function<AdaptiveAllocationsScale
176176
}
177177
return observations;
178178
}
179-
180-
void close() {
181-
for (AutoCloseable metric : metrics) {
182-
try {
183-
metric.close();
184-
} catch (Exception e) {
185-
// do nothing
186-
}
187-
}
188-
metrics.clear();
189-
}
190179
}
191180

192181
/**
@@ -274,7 +263,7 @@ public synchronized void start() {
274263
public synchronized void stop() {
275264
clusterService.removeListener(this);
276265
stopScheduling();
277-
metrics.close();
266+
scalers.clear();
278267
}
279268

280269
@Override

0 commit comments

Comments
 (0)