slackapi / slackapi/java-slack-sdk

5 threads (for the default singleton) can be created even when SlackConfig#statsEnabled is false

Aperta
#987 2 commenti 1 reazione 1 assegnatario Vedi su GitHub

@seratch ci sta già lavorando.

Dal 19/5/2022.

enhancement project:slack-api-client
Lingua principale
Java
Stelle
602
Fork
232
Merge medio
4g 9h
PR unite (30g)
7

Descrizione

Developers can disable API clients' metrics management by setting SlackConfig#statsEnabled to false. Even in this case, the default SlackConfig object creation (as a static field in the class) starts 5 threads and those threads are unused. See the repro steps below for details.

Reproducible in:

any versions

The Slack SDK version

any versions

Java Runtime version

any versions

OS info

any versions

Steps to reproduce:

Running the following code and checking the thread dump.

SlackConfig config = new SlackConfig();
config.setStatsEnabled(false);
Slack slack = Slack.getInstance(config);
Expected result:

No threads under a "slack-api-metrics" thread group are created.

Actual result:

5 threads for the default singleton SlackConfig instance are created.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.