Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 8496 invoked from network); 3 Jun 2009 02:04:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jun 2009 02:04:18 -0000 Received: (qmail 58967 invoked by uid 500); 3 Jun 2009 02:04:30 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 58872 invoked by uid 500); 3 Jun 2009 02:04:29 -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 58864 invoked by uid 99); 3 Jun 2009 02:04:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 02:04:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 02:04:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5851A234C004 for ; Tue, 2 Jun 2009 19:04:07 -0700 (PDT) Message-ID: <95103089.1243994647346.JavaMail.jira@brutus> Date: Tue, 2 Jun 2009 19:04:07 -0700 (PDT) From: "Michael McCandless (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-1651) Make IndexReader.open() always return MSR to simplify (re-)opens. In-Reply-To: <1974963326.1242920805620.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715777#action_12715777 ] Michael McCandless commented on LUCENE-1651: -------------------------------------------- I'm hitting compilation errors: {code} common.compile-core: [mkdir] Created dir: /lucene/src/msr.1651/build/classes/java [javac] Compiling 374 source files to /lucene/src/msr.1651/build/classes/java [javac] /lucene/src/msr.1651/src/java/org/apache/lucene/index/SegmentReader.java:419: directory has private access in org.apache.lucene.index.IndexReader [javac] instance.directory = dir; [javac] ^ [javac] /lucene/src/msr.1651/src/java/org/apache/lucene/index/SegmentReader.java:420: cannot find symbol [javac] symbol : variable readOnly [javac] location: class org.apache.lucene.index.SegmentReader [javac] instance.readOnly = readOnly; [javac] ^ [javac] /lucene/src/msr.1651/src/java/org/apache/lucene/index/SegmentReader.java:562: cannot find symbol [javac] symbol : variable readOnly [javac] location: class org.apache.lucene.index.SegmentReader [javac] return clone(readOnly); // Preserve current readOnly [javac] ^ [javac] /lucene/src/msr.1651/src/java/org/apache/lucene/index/SegmentReader.java:588: cannot find symbol [javac] symbol : variable readOnly [javac] location: class org.apache.lucene.index.SegmentReader [javac] if (normsUpToDate && deletionsUpToDate && !doClone && openReadOnly && readOnly) { [javac] ^ [javac] /lucene/src/msr.1651/src/java/org/apache/lucene/index/SegmentReader.java:611: cannot find symbol [javac] symbol : variable readOnly [javac] location: class org.apache.lucene.index.SegmentReader [javac] clone.readOnly = openReadOnly; [javac] ^ [javac] /lucene/src/msr.1651/src/java/org/apache/lucene/index/SegmentReader.java:612: directory has private access in org.apache.lucene.index.IndexReader [javac] clone.directory = directory; [javac] ^ [javac] /lucene/src/msr.1651/src/java/org/apache/lucene/index/SegmentReader.java:612: directory has private access in org.apache.lucene.index.IndexReader [javac] clone.directory = directory; [javac] ^ [javac] /lucene/src/msr.1651/src/java/org/apache/lucene/index/SegmentReader.java:1214: directory has private access in org.apache.lucene.index.IndexReader [javac] return directory; [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] 8 errors {code} > Make IndexReader.open() always return MSR to simplify (re-)opens. > ----------------------------------------------------------------- > > Key: LUCENE-1651 > URL: https://issues.apache.org/jira/browse/LUCENE-1651 > Project: Lucene - Java > Issue Type: Task > Affects Versions: 2.9 > Reporter: Earwin Burrfoot > Assignee: Michael McCandless > Fix For: 2.9 > > Attachments: LUCENE-1651-tag.patch, LUCENE-1651.patch, LUCENE-1651.patch > > > As per discussion in mailing list, I'm making DirectoryIndexReader.open() always return MSR, even for single-segment indexes. > While theoretically valid in the past (if you make sure to keep your index constantly optimized) this feature is made practically obsolete by per-segment collection. > The patch somewhat de-hairies (re-)open logic for MSR/SR. > SR no longer needs an ability to pose as toplevel directory-owning IR. > All related logic is moved from DIR to MSR. > DIR becomes almost empty, and copying two or three remaining fields over to MSR/SR, I remove it. > Lots of tests fail, as they rely on SR returned from IR.open(), I fix by introducing SR.getOnlySegmentReader static package-private method. > Some previous bugs are uncovered, one is fixed in LUCENE-1645, another (partially fixed in LUCENE-1648) is fixed in this patch. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org