From b7e670b9b88151d82e59169bed91c0f19869a917 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Wed, 22 Apr 2015 16:25:29 +0200 Subject: [PATCH] SONAR-6366 threads should be named who never had to do a thread dump? --- .../PlatformDatabaseMigrationExecutorServiceImpl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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() + )); } } -- 2.39.5