From 06238bc22482908ea70933b554fd38860d067eca Mon Sep 17 00:00:00 2001 From: jan-mangs Date: Thu, 20 Feb 2014 17:35:00 -0800 Subject: [PATCH] Fix thread deadlocks when running metasync for more than 5 minutes. --- src/tree/TreeBuilder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tree/TreeBuilder.java b/src/tree/TreeBuilder.java index 51c4471ee7..d8f20a2d55 100644 --- a/src/tree/TreeBuilder.java +++ b/src/tree/TreeBuilder.java @@ -510,7 +510,9 @@ public List call(final List loaded_trees) local_trees = new ArrayList(trees.size()); local_trees.addAll(trees); } - + + trees_lock.unlock(); + return local_trees; } @@ -547,6 +549,8 @@ public Object call(final Exception e) throws Exception { final List local_trees; if (trees.isEmpty()) { LOG.debug("No trees were found to process the meta through"); + trees_lock.unlock(); + return Deferred.fromResult(true); }