From 43fe48710b036691aba99bbed7af3f5eff337b6d Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 18 Jan 2011 16:12:00 +0000 Subject: [PATCH] LUCENE-2755: fix accidental commit that caused CMS to deadlock git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1060437 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/index/ConcurrentMergeScheduler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lucene/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java b/lucene/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java index 6f394532ac8..55d682d593c 100644 --- a/lucene/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java +++ b/lucene/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java @@ -274,7 +274,9 @@ public class ConcurrentMergeScheduler extends MergeScheduler { protected synchronized int mergeThreadCount() { int count = 0; for (MergeThread mt : mergeThreads) { - if (mt.isAlive()) count++; + if (mt.isAlive() && mt.getCurrentMerge() != null) { + count++; + } } return count; }