SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-926
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Shay Banon
Reporter: Miroslav Genov
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Compass

Google App Engine: NPE when existing entity is going to be re-indexed

Created: 25/Feb/10 01:06 PM   Updated: 18/Apr/10 05:34 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None


 Description  « Hide
Hello,
I'm encountering problem with transactions on GAE. Please note that I'm not using automatic indexes and I'm doing indexing manually, i.e indexing is executed by task queue call page by page until all entities where indexed. When any of my entities is updated, new task is added in the task queue for that entity.
Here is the error which I'm encountering when multiple users are editing multiple documents:

org.compass.core.engine.SearchEngineException: Failed to prepare transaction for sub index [contractentity]; nested exception is java.lang.NullPointerException: null
java.lang.NullPointerException
at org.compass.core.lucene.engine.transaction.readcommitted.TransIndex.commit(TransIndex.java:130)
at org.compass.core.lucene.engine.transaction.readcommitted.TransIndexManager.commit(TransIndexManager.java:105)
at org.compass.core.lucene.engine.transaction.readcommitted.ReadCommittedTransactionProcessor$PrepareCallable.call(ReadCommittedTransactionProcessor.java:458)
at org.compass.core.lucene.engine.transaction.readcommitted.ReadCommittedTransactionProcessor.doPrepare(ReadCommittedTransactionProcessor.java:128)
at org.compass.core.lucene.engine.transaction.support.AbstractConcurrentTransactionProcessor.prepare(AbstractConcurrentTransactionProcessor.java:115)
at org.compass.core.lucene.engine.transaction.readcommitted.ReadCommittedTransactionProcessor.doCommit(ReadCommittedTransactionProcessor.java:144)
at org.compass.core.lucene.engine.transaction.support.AbstractConcurrentTransactionProcessor.commit(AbstractConcurrentTransactionProcessor.java:127)
at org.compass.core.lucene.engine.LuceneSearchEngine.commit(LuceneSearchEngine.java:163)
at org.compass.core.transaction.LocalTransaction.doCommit(LocalTransaction.java:91)
at org.compass.core.transaction.AbstractTransaction.commit(AbstractTransaction.java:46)
at org.compass.core.impl.DefaultCompassSession.close(DefaultCompassSession.java:746)
at org.compass.core.impl.DefaultCompassSession.commit(DefaultCompassSession.java:729)
at com.evo.adm.searchengine.CompassSearchEngine.indexEntity(CompassSearchEngine.java:163)



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 04/Mar/10 09:54 AM
Can you try and run with the latest code?

Miroslav Genov added a comment - 17/Apr/10 07:47 AM
Few weeks ago I've deployed my app with the latest code, but It seems that there are still problems with datastore api and indexing. It seems that some index files get broken when several users starting to update some entities and compass is trying to re-index them. Here is what I have from my logs. After I got this problem I have to clean content and meta tables from the datastore and I have to re-index all entities again.

org.compass.needle.gae.GoogleAppEngineDirectoryException: Index [index-index-contractentity] file [_9h.fnm]: Not found
at org.compass.needle.gae.GoogleAppEngineDirectory$3.call(GoogleAppEngineDirectory.java:314)
at org.compass.needle.gae.GoogleAppEngineDirectory$3.call(GoogleAppEngineDirectory.java:303)
at org.compass.needle.gae.GoogleAppEngineDirectory$Callable.call(GoogleAppEngineDirectory.java:494)
at org.compass.needle.gae.GoogleAppEngineDirectory.doInTransaction(GoogleAppEngineDirectory.java:429)
at org.compass.needle.gae.GoogleAppEngineDirectory.doInTransaction(GoogleAppEngineDirectory.java:376)
at org.compass.needle.gae.GoogleAppEngineDirectory.fetchMetaData(GoogleAppEngineDirectory.java:303)
at org.compass.needle.gae.GoogleAppEngineDirectory.openInput(GoogleAppEngineDirectory.java:287)
at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:58)
at org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:341)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:306)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:228)
at org.apache.lucene.index.MultiSegmentReader.<init>(MultiSegmentReader.java:55)
at org.apache.lucene.index.ReadOnlyMultiSegmentReader.<init>(ReadOnlyMultiSegmentReader.java:27)
at org.apache.lucene.index.DirectoryIndexReader$1.doBody(DirectoryIndexReader.java:102)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:653)
at org.apache.lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:115)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:316)
at org.apache.lucene.index


Miroslav Genov added a comment - 18/Apr/10 05:34 AM
Yesterday I cleared all index tables from the database after that all indexes where re-indexed again, but for my badness same issue is encountered again:
rg.compass.needle.gae.GoogleAppEngineDirectoryException: Index [index-index-contractentity] file [_5y.fnm]: Not found
at org.compass.needle.gae.GoogleAppEngineDirectory$3.call(GoogleAppEngineDirectory.java:314)
at org.compass.needle.gae.GoogleAppEngineDirectory$3.call(GoogleAppEngineDirectory.java:303)
at org.compass.needle.gae.GoogleAppEngineDirectory$Callable.call(GoogleAppEngineDirectory.java:494)
at org.compass.needle.gae.GoogleAppEngineDirectory.doInTransaction(GoogleAppEngineDirectory.java:429)
at org.compass.needle.gae.GoogleAppEngineDirectory.doInTransaction(GoogleAppEngineDirectory.java:376)
at org.compass.needle.gae.GoogleAppEngineDirectory.fetchMetaData(GoogleAppEngineDirectory.java:303)
at org.compass.needle.gae.GoogleAppEngineDirectory.openInput(GoogleAppEngineDirectory.java:287)
at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:58)
at org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:341)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:306)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:228)
at org.apache.lucene.index.MultiSegmentReader.<init>(MultiSegmentReader.java:55)
at org.apache.lucene.index.ReadOnlyMultiSegmentReader.<init>(ReadOnlyMultiSegmentReader.java:27)
at org.apache.lucene.index.DirectoryIndexReader$1.doBody(DirectoryIndexReader.java:102)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:653)
at org.apache.lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:115)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:316)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:237)
at org.compass

Do you need any other information about this problem ?