Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A09ED359 for ; Mon, 5 Nov 2012 18:47:38 +0000 (UTC) Received: (qmail 6700 invoked by uid 500); 5 Nov 2012 18:47:37 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 6627 invoked by uid 500); 5 Nov 2012 18:47:37 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 6620 invoked by uid 99); 5 Nov 2012 18:47:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2012 18:47:37 +0000 X-ASF-Spam-Status: No, hits=1.1 required=5.0 tests=TRACKER_ID X-Spam-Check-By: apache.org Received-SPF: unknown -allip4:64.6.108.239 (nike.apache.org: encountered unrecognized mechanism during SPF processing of domain of hsn@filez.com) Received: from [64.6.108.239] (HELO ponto.amerinoc.com) (64.6.108.239) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2012 18:47:27 +0000 Received: from fbsd9.localdomain (205.83.broadband7.iol.cz [88.102.83.205]) (authenticated bits=128) by ponto.amerinoc.com (8.14.5/8.14.5) with ESMTP id qA5Il2K7032608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 5 Nov 2012 19:47:06 +0100 (CET) (envelope-from hsn@filez.com) Received: from [127.0.0.1] ([10.0.0.1]) by fbsd9.localdomain (8.14.5/8.14.5) with ESMTP id qA5IkukG001138 for ; Mon, 5 Nov 2012 19:46:57 +0100 (CET) (envelope-from hsn@filez.com) Message-ID: <50980880.7000708@filez.com> Date: Mon, 05 Nov 2012 19:42:08 +0100 From: Radim Kolar User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: dev@lucene.apache.org Subject: concurrentmergescheduller Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 121105-0, 05.11.2012), Outbound message X-Antivirus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org i suspect that this code is broken. Lines 331 - 343 in org.apache.lucene.index.ConcurrentMergeScheduler.merge(IndexWriter) mergeThreadCount() are currently active merges, they can be at most maxThreadCount, maxMergeCount is number of queued merges defaulted with maxThreadCount+2 and it can never be lower then maxThreadCount, which means that condition in while can never become true. synchronized(this) { long startStallTime = 0; while (mergeThreadCount() >= 1+maxMergeCount) { startStallTime = System.currentTimeMillis(); if (verbose()) { message(" too many merges; stalling..."); } try { wait(); } catch (InterruptedException ie) { throw new ThreadInterruptedException(ie); } } maxThreadCount+2; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org