summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-01-16 15:39:58 +0100
committerJon Marius Venstad <venstad@gmail.com>2020-01-16 15:39:58 +0100
commit1f02dd7f9b53d32e2dbc1242de56dc1b6135b097 (patch)
tree74c3b53988c257d5924f71f86725f527f952b8a1
parent9267392ca57cdd2aa642383ca652125975f7653c (diff)
Be less stupoid
-rw-r--r--zkfacade/src/main/java/com/yahoo/vespa/curator/Lock.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/zkfacade/src/main/java/com/yahoo/vespa/curator/Lock.java b/zkfacade/src/main/java/com/yahoo/vespa/curator/Lock.java
index 98b5732eb64..2e554d39e44 100644
--- a/zkfacade/src/main/java/com/yahoo/vespa/curator/Lock.java
+++ b/zkfacade/src/main/java/com/yahoo/vespa/curator/Lock.java
@@ -34,9 +34,12 @@ public class Lock implements Mutex {
" to acquire lock '" + lockPath + "'");
if ( ! lock.tryLock()) { // Should be available to only this thread, while holding the above mutex.
release();
- throw new IllegalStateException("InterProcessMutex acquired, but guarded lock held by someone else");
+ throw new IllegalStateException("InterProcessMutex acquired, but guarded lock held by someone else, for lock '" + lockPath + "'");
}
}
+ catch (UncheckedTimeoutException | IllegalStateException e) {
+ throw e;
+ }
catch (Exception e) {
throw new RuntimeException("Exception acquiring lock '" + lockPath + "'", e);
}