Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 65222 invoked from network); 13 Dec 2006 22:49:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Dec 2006 22:49:05 -0000 Received: (qmail 75908 invoked by uid 500); 13 Dec 2006 22:49:10 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 75871 invoked by uid 500); 13 Dec 2006 22:49:10 -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 75860 invoked by uid 99); 13 Dec 2006 22:49:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Dec 2006 14:49:10 -0800 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [206.190.38.243] (HELO web50310.mail.yahoo.com) (206.190.38.243) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 13 Dec 2006 14:48:59 -0800 Received: (qmail 80132 invoked by uid 60001); 13 Dec 2006 22:48:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=HQoUHCHVvfPFWYtwI/Q/4ztOQG3HqB5QfbYBRaol5HSCkHO1aBZZOM+q9crUhZ+pU33TBjVs528nCmrCMHW7if4qics+YYLSWWYa542ffNJFfKpZXLGo9goHlyfKlSBhwxksi+YtwEylpx0Y+TyGzS4KjljSz/wVzHOSnCnZPk0= ; Message-ID: <20061213224838.80130.qmail@web50310.mail.yahoo.com> Received: from [74.65.202.166] by web50310.mail.yahoo.com via HTTP; Wed, 13 Dec 2006 14:48:38 PST Date: Wed, 13 Dec 2006 14:48:38 -0800 (PST) From: Otis Gospodnetic Subject: Re: TermInfosReader and clone of SegmentTermEnum To: java-dev@lucene.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Aaaah, I think I get it.=0ATermIndexReader can be shared by multiple thread= s.=0AEach thread will need access to SegmentTermEnum inside the TIR, but si= nce each of them will search, scan, and seek to a different location, each = threads needs its own copy/clone of the original SegmentTermEnum.=0A=0AThre= adLocal is then used as a simple cache for the clone of the original Segmen= tTermEnum, so a single thread can get to it without repeating scan/seek stu= ff, and so that each thread works with its own clone of SegmentTermEnum.=0A= =0AOtis=0A=0A----- Original Message ----=0AFrom: Otis Gospodnetic =0ATo: java-dev@lucene.apache.org=0ASent: Wednesday, Dec= ember 13, 2006 4:53:45 PM=0ASubject: TermInfosReader and clone of SegmentTe= rmEnum=0A=0AHi,=0A=0AI'm looking at Robert Engels' patches in http://issues= .apache.org/jira/browse/LUCENE-436 and looking at TermInfosReader.=0AI thin= k I understand why there is ThreadLocal there in the first place - to act a= s a per-thread cache for the expensive to compute SegmentTermEnum.... yes?= =0A=0ABut why is there is need to clone() the (original) SegmentTermEnum?= =0A=0AThanks,=0AOtis=0A=0A=0A=0A=0A----------------------------------------= -----------------------------=0ATo unsubscribe, e-mail: java-dev-unsubscrib= e@lucene.apache.org=0AFor additional commands, e-mail: java-dev-help@lucene= .apache.org=0A=0A=0A=0A --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org