jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Neale" <michael.ne...@gmail.com>
Subject Index/data corruption
Date Tue, 24 Apr 2007 00:18:29 GMT
Hi All, kind of related to another issue I am working on (
https://issues.apache.org/jira/browse/JCR-778 )

When I get an index failure (as above), often afterwards I get:

javax.jcr.RepositoryException: already contains: _c: already contains: _c:
already contains: _c
    at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(
SearchManager.java:515)
    at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java
:250)
    at org.apache.jackrabbit.core.RepositoryImpl.getSystemSearchManager(
RepositoryImpl.java:642)
    at org.apache.jackrabbit.core.RepositoryImpl.access$300(
RepositoryImpl.java:103)
    at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(
RepositoryImpl.java:1638)
    at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(
RepositoryImpl.java:622)
    at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(
RepositoryImpl.java:375)
    at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java
:293)
    at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java
:573)
    at org.apache.jackrabbit.core.TransientRepository$2.getRepository(
TransientRepository.java:245)
    at org.apache.jackrabbit.core.TransientRepository.startRepository(
TransientRepository.java:265)
    at org.apache.jackrabbit.core.TransientRepository.login(
TransientRepository.java:333)
    at org.apache.jackrabbit.core.TransientRepository.login(
TransientRepository.java:363)
    at org.drools.repository.RulesRepositoryTest.getNoDelRepo(
RulesRepositoryTest.java:99)
    at org.drools.repository.RulesRepositoryTest.testLoadOnly(
RulesRepositoryTest.java:22)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(
JUnit3TestReference.java:128)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(
TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
RemoteTestRunner.java:196)
Caused by: java.lang.IllegalArgumentException: already contains: _c
    at org.apache.jackrabbit.core.query.lucene.IndexInfos.addName(
IndexInfos.java:170)
    at org.apache.jackrabbit.core.query.lucene.MultiIndex.deleteIndex(
MultiIndex.java:716)
    at
org.apache.jackrabbit.core.query.lucene.MultiIndex$DeleteIndex.execute(
MultiIndex.java:1553)
    at org.apache.jackrabbit.core.query.lucene.MultiIndex.executeAndLog(
MultiIndex.java:809)
    at org.apache.jackrabbit.core.query.lucene.MultiIndex.flush(
MultiIndex.java:740)
    at org.apache.jackrabbit.core.query.lucene.Recovery.run(Recovery.java
:160)
    at org.apache.jackrabbit.core.query.lucene.Recovery.run(Recovery.java
:85)
    at org.apache.jackrabbit.core.query.lucene.MultiIndex.<init>(
MultiIndex.java:268)
    at org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(
SearchIndex.java:245)
    at org.apache.jackrabbit.core.query.AbstractQueryHandler.init(
AbstractQueryHandler.java:44)
    at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(
SearchManager.java:513)
    ... 32 more
java.lang.IllegalArgumentException: already contains: _c
    at org.apache.jackrabbit.core.query.lucene.IndexInfos.addName(
IndexInfos.java:170)
    at org.apache.jackrabbit.core.query.lucene.MultiIndex.deleteIndex(
MultiIndex.java:716)
    at
org.apache.jackrabbit.core.query.lucene.MultiIndex$DeleteIndex.execute(
MultiIndex.java:1553)
    at org.apache.jackrabbit.core.query.lucene.MultiIndex.executeAndLog(
MultiIndex.java:809)
    at org.apache.jackrabbit.core.query.lucene.MultiIndex.flush(
MultiIndex.java:740)
    at org.apache.jackrabbit.core.query.lucene.Recovery.run(Recovery.java
:160)
    at org.apache.jackrabbit.core.query.lucene.Recovery.run(Recovery.java
:85)
    at org.apache.jackrabbit.core.query.lucene.MultiIndex.<init>(
MultiIndex.java:268)
    at org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(
SearchIndex.java:245)
    at org.apache.jackrabbit.core.query.AbstractQueryHandler.init(
AbstractQueryHandler.java:44)
    at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(
SearchManager.java:513)
    at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java
:250)
    at org.apache.jackrabbit.core.RepositoryImpl.getSystemSearchManager(
RepositoryImpl.java:642)
    at org.apache.jackrabbit.core.RepositoryImpl.access$300(
RepositoryImpl.java:103)
    at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(
RepositoryImpl.java:1638)
    at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(
RepositoryImpl.java:622)
    at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(
RepositoryImpl.java:375)
    at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java
:293)
    at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java
:573)
    at org.apache.jackrabbit.core.TransientRepository$2.getRepository(
TransientRepository.java:245)
    at org.apache.jackrabbit.core.TransientRepository.startRepository(
TransientRepository.java:265)
    at org.apache.jackrabbit.core.TransientRepository.login(
TransientRepository.java:333)
    at org.apache.jackrabbit.core.TransientRepository.login(
TransientRepository.java:363)
...

when trying to login to the repository the next time. This is extremely
alarming to me. If I go in and blow away the contents of the index
directories, it will then work for a while after that (once it has recreted)
but it only takes a dozen or so "cycles" (startup, run a query, shutdown) to
get back into this state.

This got me thinking, how are the lucene indexes kept in sync - they can't
be part of the transaction can they? I mean they can try to be. This worries
me, I don't like being worried.

Any advice much appreciated, this is pretty much stopping the show for me
now.

Also, I have uploaded a repository+test to show the "corrption":
http://www.users.on.net/~michaelneale/work/jackrabbit-JCR-778.-corrupt-index-or-data.zip(mentioned
in the JIRA)

Michael

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message