From bc5622d890eeefd7a180f1c057a6a41ca9614ed5 Mon Sep 17 00:00:00 2001 From: HÃ¥kon Hallingstad Date: Wed, 11 Nov 2020 11:29:43 +0100 Subject: Fix thread lock detection bug The effect of the bug was that a deadlock would be reported as long as the current thread T0 that tries to acquire the ZK path P0 is in the following situation: 1. Thread T0 tries to acquire ZK path P0, held by T1. 2. Thread T1 tries to acquire ZK path P1, held by T2. Instead, T2 would need to equal T0. Or, 3. Thread T2 tries to acquire ZK path P2, held by T3 = one of (T0, T1). etc. --- vespajlib/src/main/java/com/yahoo/concurrent/StripedExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vespajlib') diff --git a/vespajlib/src/main/java/com/yahoo/concurrent/StripedExecutor.java b/vespajlib/src/main/java/com/yahoo/concurrent/StripedExecutor.java index 3702ed40be0..37b560d1129 100644 --- a/vespajlib/src/main/java/com/yahoo/concurrent/StripedExecutor.java +++ b/vespajlib/src/main/java/com/yahoo/concurrent/StripedExecutor.java @@ -30,7 +30,7 @@ public class StripedExecutor { /** Creates a new StripedExecutor which delegates to a {@link Executors#newCachedThreadPool(ThreadFactory)}. */ public StripedExecutor() { - this(Executors.newCachedThreadPool(ThreadFactoryFactory.getDaemonThreadFactory(StripedExecutor.class.getName()))); + this(Executors.newCachedThreadPool(ThreadFactoryFactory.getDaemonThreadFactory(StripedExecutor.class.getSimpleName()))); } /** Creates a new StripedExecutor which delegates to the given executor service. */ -- cgit v1.2.3