Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,6 @@ Collection<DoubleWithAttributes> observeDouble(Function<AdaptiveAllocationsScale
}
return observations;
}

void close() {
for (AutoCloseable metric : metrics) {
try {
metric.close();
} catch (Exception e) {
// do nothing
}
}
metrics.clear();
}
}

/**
Expand Down Expand Up @@ -261,7 +250,7 @@ public synchronized void start() {
public synchronized void stop() {
clusterService.removeListener(this);
stopScheduling();
metrics.close();
scalers.clear();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've leave the metrics list as is and don't recreate them (which leads to errors).

Clearing the scalers collection, so that the metrics do not observe anything anymore.

}

@Override
Expand Down
Loading