Hi Valeri,
Thanks for the test case. Please could you open a new issue?

https://github.com/orientechnologies/orientdb/issues/new

Best Regards,

Luca Garulli
CEO at Orient Technologies LTD
the Company behind OrientDB
http://about.me/luca.garulli


On 27 May 2015 at 14:06, <[email protected]> wrote:

> I created example to reproduce. On 2.1-rc3 it hangs in several seconds
>
> final ODatabaseDocumentTx db = new 
> ODatabaseDocumentTx("memory:default").open("admin", "admin");
> final OrientGraphNoTx graph = new OrientGraphNoTx(db);
> final OrientVertexType c1 = graph.createVertexType("C1");
> c1.createProperty("p1", OType.INTEGER);
> c1.createIndex("p1", "unique", "p1");
>
> final List<Thread> threads = new ArrayList<>();
> final Random random = new Random();
> final AtomicInteger count = new AtomicInteger();
> for (int i = 0; i < 50; i++) {
>     final Thread thread = new Thread(new Runnable() {
>         @Override
>         public void run() {
>             for (int j = 0; j < 1000; j++) {
>                 final ODatabaseDocumentTx db = new 
> ODatabaseDocumentTx("memory:default").open("admin", "admin");
>                 final OrientGraph graph = new OrientGraph(db);
>                 graph.begin();
>                 final OrientVertex result = graph.addVertex("class:C1");
>                 result.setProperty("p1", random.nextInt());
>
>                 final OIndex<?> index = 
> db.getMetadata().getIndexManager().getIndex("p1");
>                 for (int k = 0; k < 100; k++) {
>                     index.get(random.nextInt());
>                 }
>
>                 graph.shutdown(true, true);
>                 if (count.incrementAndGet() % 100 == 0) {
>                     System.out.print('.');
>                     if (count.get() % 10000 == 0) {
>                         System.out.println();
>                     }
>                 }
>             }
>         }
>     });
>     threads.add(thread);
>     thread.start();
> }
> try {
>     for (Thread thread : threads) {
>         thread.join();
>     }
> } catch (InterruptedException e) {
> }
>
>
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to