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

Key: CMP-570
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Michael Soland
Votes: 0
Watchers: 1
Operations

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

Spell Check: concurrency issue when rebuilding the spell check index, currently executing queries should finish before entering the critical path

Created: 02/Mar/08 05:20 PM   Updated: 10/Oct/10 05:11 PM
Component/s: Compass::Core
Affects Version/s: 2.0.0 M3
Fix Version/s: 2.0.0 M3

Environment: 2.0.M3 Revision #2925


 Description  « Hide
It appears that a query was still reading the index when the spell check index rebuild task was started:
  • Starting scheduled index manager with period [60000ms]
  • {hibernate.document}: Finished indexing 35953 entities [com.example.Document]
  • Closing Compass [documentCompass]
  • Closed Compass [documentCompass]
  • Starting scheduled optimizer [class org.compass.core.lucene.engine.optimizer.AdaptiveOptimizer] with period [10000ms]
  • Starting scheduled index manager with period [60000ms]
  • Rebulding spell check index ...
  • Failed to open index searcher for sub-index [document]; nested exception is org.compass.core.engine.SearchEngineException: Failed to open sub index cache [document]; nested exception is java.io.IOException: No sub-file with id _0.fdt found
    org.compass.core.engine.SearchEngineException: Failed to open index searcher for sub-index [document]; nested exception is org.compass.core.engine.SearchEngineException: Failed to open sub index cache [document]; nested exception is java.io.IOException: No sub-file with id _0.fdt found
    org.compass.core.engine.SearchEngineException: Failed to open sub index cache [document]; nested exception is java.io.IOException: No sub-file with id _0.fdt found
    java.io.IOException: No sub-file with id _0.fdt found
    at org.apache.lucene.index.CompoundFileReader.openInput(CompoundFileReader.java:137)
    at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:75)
    at org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:308)
    at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:262)
    at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:197)
    at org.apache.lucene.index.MultiSegmentReader.<init>(MultiSegmentReader.java:55)
    at org.apache.lucene.index.DirectoryIndexReader$1.doBody(DirectoryIndexReader.java:75)
    at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:636)
    at org.apache.lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:63)
    at org.apache.lucene.index.IndexReader.open(IndexReader.java:209)
    at org.apache.lucene.index.IndexReader.open(IndexReader.java:192)
    at org.compass.core.lucene.engine.manager.LuceneIndexHolder.<init>(LuceneIndexHolder.java:54)
    at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager.internalRefreshCache(DefaultLuceneSearchEngineIndexManager.java:338)
    at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager.openIndexHolderBySubIndex(DefaultLuceneSearchEngineIndexManager.java:363)
    at org.compass.core.lucene.engine.transaction.readcommitted.ReadCommittedTransaction.doInternalSearch(ReadCommittedTransaction.java:132)
    at org.compass.core.lucene.engine.transaction.AbstractTransaction.internalSearch(AbstractTransaction.java:107)
    at org.compass.core.lucene.engine.transaction.readcommitted.ReadCommittedTransaction.doFind(ReadCommittedTransaction.java:156)
    at org.compass.core.lucene.engine.transaction.AbstractTransaction.find(AbstractTransaction.java:99)
    at org.compass.core.lucene.engine.LuceneSearchEngine.find(LuceneSearchEngine.java:426)
    at org.compass.core.lucene.engine.LuceneSearchEngineQuery.hits(LuceneSearchEngineQuery.java:181)
    at org.compass.core.impl.DefaultCompassQuery.hits(DefaultCompassQuery.java:154)
    at com.example.myCode...
  • Spell check index rebuilt


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 02/Mar/08 05:34 PM
It does no look like a spell check issue, at least not from the stack trace, since it tries to open an index reader against the actual index, and not the spell check index. The actual index should already have been rebuilt and "committed", so this exception is very strange... . After this exception, do other queries work?

Shay Banon added a comment - 02/Mar/08 06:34 PM
I have improved the indexing process of ComapssGps and the replace index operation which should make things better. This improvement was on my check list for this version, and it might explain what you see. This improvement is not related to spell check support, so if your assumption is correct and it has something to do with spell check, it will won't fix it. Can you give the latest a go?

(also, make sure you update the lucene jars to the ones included with Compass, since I updated it to 2.3.1).


Michael Soland added a comment - 03/Mar/08 01:19 AM
Yes, other queries worked after the exception was thrown. The tests I ran were with Lucene 2.3.1 (I saw the update in the list of resolved and closed issues, but thanks for the reminder; I could miss something like that in the future). I'm running an extensive load test on a build from revision #2929, so I'll let you know the results of the test in about 24 hours so that any problem that is still present has a chance to bubble up. Thanks again for responding to these issues over the weekend.

Michael Soland added a comment - 04/Mar/08 04:22 AM
I believe this issue is resolved. I've been aggressively testing it for the past 24 hours and haven't had any issues. Great work!

Shay Banon added a comment - 04/Mar/08 05:32 AM
Great!. I will close this issue then.

Razan Abbass added a comment - 10/Oct/10 05:11 PM