From: Sébastien Lesaint Date: Wed, 22 Apr 2015 14:25:29 +0000 (+0200) Subject: SONAR-6366 threads should be named X-Git-Tag: 5.2-RC1~2149 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b7e670b9b88151d82e59169bed91c0f19869a917;p=sonarqube.git SONAR-6366 threads should be named who never had to do a thread dump? --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/PlatformDatabaseMigrationExecutorServiceImpl.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/PlatformDatabaseMigrationExecutorServiceImpl.java index e1056105507..54701d46225 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/PlatformDatabaseMigrationExecutorServiceImpl.java +++ b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/PlatformDatabaseMigrationExecutorServiceImpl.java @@ -19,6 +19,7 @@ */ package org.sonar.server.db.migrations; +import com.google.common.util.concurrent.ThreadFactoryBuilder; import org.sonar.server.util.AbstractStoppableExecutorService; import java.util.concurrent.Executors; @@ -32,6 +33,12 @@ public class PlatformDatabaseMigrationExecutorServiceImpl implements PlatformDatabaseMigrationExecutorService { public PlatformDatabaseMigrationExecutorServiceImpl() { - super(Executors.newSingleThreadExecutor()); + super( + Executors.newSingleThreadExecutor( + new ThreadFactoryBuilder() + .setDaemon(false) + .setNameFormat("DB_migration-%d") + .build() + )); } }