Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 31087 invoked from network); 11 Feb 2010 15:41:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Feb 2010 15:41:50 -0000 Received: (qmail 10030 invoked by uid 500); 11 Feb 2010 15:41:49 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 9952 invoked by uid 500); 11 Feb 2010 15:41:49 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 9944 invoked by uid 99); 11 Feb 2010 15:41:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2010 15:41:49 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yseeley@gmail.com designates 209.85.219.218 as permitted sender) Received: from [209.85.219.218] (HELO mail-ew0-f218.google.com) (209.85.219.218) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2010 15:41:40 +0000 Received: by ewy10 with SMTP id 10so1435757ewy.11 for ; Thu, 11 Feb 2010 07:41:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=f7aY24OJ3r4bE/YETAZpZPdwTGX2/ewDWCSpurM1n6k=; b=EA4X8meKFyeiuCVkBWTBI9fLckttTB3ONUS3mqDB5eGjgLD7EPNnNWKOaJc+4GXOBE AkII7f8Nl9ZeahZ192PY6gSOqkN3dP8jWGqAsf9izAkHV7guEwaBvEtH0FnU4CFyToSf UBn063bRlZBFrpt2zx1ZV+E6RZbI1w36C0H1A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=ICOZ3M4O7z7c5l5nnMW2Hum5zGPC+W3cXNufL3Wa4E3ivjlVOH4+Ccu+E3M7SGtIJQ ymAXC+qwuIGADLcQwmVuJYoVJOR0xvPnC5ilBI4H0RyIxPRq4c/xFG+UWhIyBibyrpqc Dc1CiuLKBxdwlHZW3bsZuhvolATRv3ntaw7bA= MIME-Version: 1.0 Sender: yseeley@gmail.com Reply-To: yonik@lucidimagination.com Received: by 10.216.88.202 with SMTP id a52mr8083wef.101.1265902878460; Thu, 11 Feb 2010 07:41:18 -0800 (PST) In-Reply-To: References: Date: Thu, 11 Feb 2010 10:41:18 -0500 X-Google-Sender-Auth: cba6164f75bb3c18 Message-ID: Subject: Re: FieldCacheImpl concurrency From: Yonik Seeley To: java-dev@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Feb 11, 2010 at 9:54 AM, Shay Banon wrote: > =A0=A0 I would like to try and improve concurrency in Lucene in several p= laces, > and thought I would start with FieldCacheImpl. The implementation is heav= ily > synchronized on both a global map and on creation values for a pretty > heavily used path (get). It really shouldn't be heavily used. For a sorted search, get() is called once per segment in the index. There is no synchronization to retrieve per-document values. We have just barely moved to Java5 though, and so it would probably be pretty easy to improve the concurrency of the read path if it did become problematic. > I think the weak hash map is a good solution (but > also think that the ability to choose to use soft hash map would add even > greater flexibility), the problem is that there is no built in concurrent > weak/soft hash map. It might be a better idea to have interfaces that allow one to implement their own policies rather than to try and push all the different options into Lucene: https://issues.apache.org/jira/browse/LUCENE-831 -Yonik http://www.lucidimagination.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org