Skip to content

Commit

Permalink
Don't close/recreate adaptive allocations metrics (elastic#114721)
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-elastic authored Oct 14, 2024
1 parent e145199 commit 0c02c2b
Showing 1 changed file with 1 addition and 12 deletions.
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();
}

@Override
Expand Down

0 comments on commit 0c02c2b

Please sign in to comment.