lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ritesh Nigam (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2280) IndexWriter.optimize() throws NullPointerException
Date Wed, 24 Feb 2010 11:24:28 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837744#action_12837744
] 

Ritesh Nigam commented on LUCENE-2280:
--------------------------------------

Are you sure you're using a stock version 2.3.2 of Lucene?
- Yes, I checked the manifest of the jar.

I ask because... the line numbers in SegmentMerger (specifically 566) don't correlate to 2.3.2.
The other line numbers do match. It's odd.

But looking at the code I don't see how either of the arrays being passed to System.arraycopy
can be null.

Can you turn on IndexWriter's infoStream and capture & post the output?
- I have turned on the infostream for IndexWriter, it will take some time to get the result.
once I get the result I will post that.

It's also strange that this leads to index corruption; it shouldn't (the merge should just
fail, and the index should be untouched). Can you run CheckIndex on the index and post what
corruption it uncovers.
- Here index corruption I mean that the main index file is getting deleted and search is not
returning expected result. Hence there is no index file exists after the NullPointerExcepton,
I cannot run CheckIndex.

Does this happen in a Sun JRE?
- I have not yet tested the same scenario on Sun JRE till now.

> IndexWriter.optimize() throws NullPointerException
> --------------------------------------------------
>
>                 Key: LUCENE-2280
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2280
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.3.2
>         Environment: Win 2003, lucene version 2.3.2, IBM JRE 1.6
>            Reporter: Ritesh Nigam
>
> I am using lucene 2.3.2 search APIs for my application, i am indexing 45GB database which
creates approax 200MB index file, after finishing the indexing and while running optimize()
i can see NullPointerExcception thrown in my log and index file is getting corrupted, log
says
> ------------------------------------------------------------------------
> Caused by: 
> java.lang.NullPointerException
> 	at org.apache.lucene.store.BufferedIndexOutput.writeBytes(BufferedIndexOutput.java:49)
> 	at org.apache.lucene.store.IndexOutput.writeBytes(IndexOutput.java:40)
> 	at org.apache.lucene.index.SegmentMerger.mergeNorms(SegmentMerger.java:566)
> 	at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:135)
> 	at org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:3273)
> 	at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:2968)
> 	at org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:240)
> ------------------------------------------------------------------------
> and this is happening quite frequently, although I am not able to reproduce it on demand,
I saw an issue logged which is some what related to mine issue (http://mail-archives.apache.org/mod_mbox/lucene-solr-user/200809.mbox/%3C6E4A40DB-5EFC-42DA-A857-D59F4EC3496B@mikemccandless.com%3E)
but the only difference here is I am not using Store.Compress for my fields, i am using Store.NO
instead. please note that I am using IBM JRE for my application.
> Is this an issue with lucene?, if yes it is fixed in which version?

-- 
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


Mime
View raw message