Bug 682 - Handing of Missing Indexes Poor in BaseIndexer
Summary: Handing of Missing Indexes Poor in BaseIndexer
Status: CONFIRMED
Alias: None
Product: E3
Classification: Unclassified
Component: index (show other bugs)
Version: trunk
Hardware: All All
: P2 normal
Target Milestone: next
Assignee: Richard Harms
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-05 09:53 CDT by Richard Harms
Modified: 2017-07-15 11:04 CDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Harms 2008-08-05 09:53:07 CDT
If the index files are missing for some reason (development machine, production error, etc.), NPEs are thrown each time indexing is attempted.

IOException is swallowed here, and not reported:

09:48:00,069 ERROR [STDERR] java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.FSDirectory@/private/tmp/share/indexes/customer: files:
09:48:00,070 ERROR [STDERR] 	at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:587)
09:48:00,070 ERROR [STDERR] 	at org.apache.lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:63)
09:48:00,070 ERROR [STDERR] 	at org.apache.lucene.index.IndexReader.open(IndexReader.java:209)
09:48:00,070 ERROR [STDERR] 	at org.apache.lucene.index.IndexReader.open(IndexReader.java:173)
09:48:00,070 ERROR [STDERR] 	at com.echothree.control.user.index.server.indexer.BaseIndexer.getIndexReader(BaseIndexer.java:273)
[...]

Resulting in later NPEs from:

Caused by: java.lang.NullPointerException
	at com.echothree.control.user.index.server.indexer.PartyIndexer.updatePartyEntitiesInIndex(PartyIndexer.java:176)
	at com.echothree.control.user.index.server.indexer.PartyIndexer.updatePartyIndex(PartyIndexer.java:349)
	at com.echothree.control.user.index.server.indexer.CustomerIndexer.updateCustomerIndex(CustomerIndexer.java:34)
[...]

IOException/FileNotFoundException handling needs improved. If FileNotFoundException, try to create directory. If that succeeds, mark index as needing to be reindexed. Otherwise, disable indexing for the current index.
Comment 1 Richard Harms 2008-12-03 11:25:22 CST
Moving to new milestone, all changes to this point have been tagged in trunk-2008-12-03-01.
Comment 2 Richard Harms 2008-12-08 16:44:06 CST
Moving to new milestone, all changes to this point have been tagged in
trunk-2008-12-08-01.
Comment 3 Richard Harms 2008-12-10 12:00:25 CST
Moving to new milestone, all changes to this point have been tagged in
trunk-2008-12-10-01.
Comment 4 Richard Harms 2008-12-15 07:31:39 CST
Moving to new milestone, all changes to this point have been tagged in
trunk-2008-12-15-01.