jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Nuescheler <david.nuesche...@gmail.com>
Subject search index corruption?
Date Sat, 02 Oct 2004 13:06:22 GMT
hi guys,

i was looking into doing some very simple benchmarks to see 
how fast jackrabbit can create nodes.

my test script:
--------
import org.apache.jackrabbit.core.RepositoryFactory;
import javax.jcr.*;

public class PerfTest {

    public static void main (String[] args) {
        try {
            RepositoryFactory repof = RepositoryFactory.create(args[0]);
            Repository repo=repof.getRepository("localfs");
            Session session=repo.login(new
SimpleCredentials("uncled","".toCharArray()),"default");
            Node root=session.getRootNode();
            System.out.println(root.getProperty("jcr:primaryType").getString());
            if (root.hasNode("perftest")) {
                root.remove("perftest");
            }
            Node testroot=root.addNode("perftest", "nt:unstructured");
            root.save();
            long start=System.currentTimeMillis();
            int i=0;
            while (i<10) {
                Node testnode=testroot.addNode("test"+i,"nt:unstructured");
                System.out.println(testnode.getPath());
                i++;
            }
            testroot.save();
            long done=System.currentTimeMillis();
            System.out.println("time:"+(done-start)+"ms");
            session.logout();
        } catch (RepositoryException ex) {
            System.err.println(ex.toString());
        }
    }
}

----

if i clear (rm -rf) my "repositories" directory and start this test 
for the first time everything seems to work. if i start the same 
test repeatedly i get the following exception:

02.10.2004 14:53:54 *ERROR* [main] SearchManager: error indexing node.
(SearchManager.java, line 206)
java.io.IOException: Lock obtain timed out
	at org.apache.lucene.store.Lock.obtain(Lock.java:97)
	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:173)
	at org.apache.jackrabbit.core.search.lucene.AbstractIndex.getIndexWriter(AbstractIndex.java:101)

am i missing something? probably ;)

regards,
david
----------------------------------------------------------------------
standardize your content-repository !
                               http://www.jcp.org/en/jsr/detail?id=170
---------------------------------------< david.nuescheler@day.com >---

This message is a private communication. If you are not the intended
recipient, please do not read, copy, or use it, and do not disclose it
to others. Please notify the sender of the delivery error by replying
to this message, and then delete it from your system. Thank you.

The sender does not assume any liability for timely, trouble free,
complete, virus free, secure, error free or uninterrupted arrival of
this e-mail. For verification please request a hard copy version.


mailto:david.nuescheler@day.com
http://www.day.com

David Nuescheler
Chief Technology Officer
Day Software AG
Barfuesserplatz 6 / Postfach
4001 Basel
Switzerland

T  41 61 226 98 98
F  41 61 226 98 97

Mime
View raw message