diff options
author | Håkon Hallingstad <hakon@verizonmedia.com> | 2020-11-11 11:29:43 +0100 |
---|---|---|
committer | Håkon Hallingstad <hakon@verizonmedia.com> | 2020-11-11 11:29:43 +0100 |
commit | bc5622d890eeefd7a180f1c057a6a41ca9614ed5 (patch) | |
tree | 320bb5a9c00fd3fc9952575e905198baa36d87c7 /vespajlib | |
parent | 158549f21554108c93062536ab34ee12fa19905f (diff) |
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.
Diffstat (limited to 'vespajlib')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/concurrent/StripedExecutor.java | 2 |
1 files changed, 1 insertions, 1 deletions
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<Key> { /** 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. */ |