I believe you've found a bug in the per-node relationship cache when
deleting relationships in the same iteration session as the lazy loading
(grab size 100) of those relationships, and at the same time doing commits
now and then in the middle of the iteration. At first sight it may be
non-trivial to fix though. I've created a ticket for it:
https://github.com/neo4j/community/issues/52 which points to a reduced
version of your test case. Thank you for reporting it.

Best,
Mattias

2011/10/6 st.pa <st...@web.de>

>
> community 1.4.1. embedded
>
>
> Am 05.10.2011 15:54, schrieb Mattias Persson:
> > Hi,
> >
> > which version of neo4j were you running this with?
> >
> > 2011/10/5 st.pa<st...@web.de>
> >
> >>
> >> Hi.
> >>
> >> I tried to delete several million relationships of certain types from
> the
> >> reference node of an embedded graphdb, where there were several other
> >> relationshiptypes that were not to be affected. The Javadoc of
> >> Node#getRelationships(**RelationshipType...) says that it returns all
> >> relationships of the given type(s), so I expected that after one call
> I'd
> >> really get all. That was not the case. In my test-production-db i needed
> >> about 8 iterations, haven't recreated that in the test yet. But the test
> >> shows that not returning all desired relationships doesn't seem to
> depend on
> >> the total number of relationships as i thought in the beginning, if one
> runs
> >> the test with different numbers for insertions.
> >>
> >> Here's the log:
> >>
> >> 05.10.2011 13:36:16 test01 - create graph
> >> 05.10.2011 13:36:16 try to delete c:/_src/neo4j-test-remove-**
> >> relationships
> >> 05.10.2011 13:36:16 done deleting
> >> 05.10.2011 13:36:16 create graph db at c:/_src/neo4j-test-remove-**
> >> relationships
> >> 05.10.2011 13:36:22 retrieve root node and add another node
> >> 05.10.2011 13:36:22 prepare to cycle through relTypes
> >> 05.10.2011 13:36:22 loop to insert relationships by cycling through
> >> relTypes
> >> 05.10.2011 13:36:22 0 of 2097152 relationships inserted
> >> 05.10.2011 13:36:26 131072 of 2097152 relationships inserted
> >> 05.10.2011 13:36:28 262144 of 2097152 relationships inserted
> >> 05.10.2011 13:36:33 393216 of 2097152 relationships inserted
> >> 05.10.2011 13:36:35 524288 of 2097152 relationships inserted
> >> 05.10.2011 13:36:40 655360 of 2097152 relationships inserted
> >> 05.10.2011 13:36:43 786432 of 2097152 relationships inserted
> >> 05.10.2011 13:36:48 917504 of 2097152 relationships inserted
> >> 05.10.2011 13:36:53 1048576 of 2097152 relationships inserted
> >> 05.10.2011 13:36:58 1179648 of 2097152 relationships inserted
> >> 05.10.2011 13:37:02 1310720 of 2097152 relationships inserted
> >> 05.10.2011 13:37:08 1441792 of 2097152 relationships inserted
> >> 05.10.2011 13:37:12 1572864 of 2097152 relationships inserted
> >> 05.10.2011 13:37:20 1703936 of 2097152 relationships inserted
> >> 05.10.2011 13:37:25 1835008 of 2097152 relationships inserted
> >> 05.10.2011 13:37:33 1966080 of 2097152 relationships inserted
> >> 05.10.2011 13:37:37 2097152 of 2097152 relationships inserted
> >> 05.10.2011 13:37:37 finished inserting 2097152 relationships
> >> 05.10.2011 13:37:37 second part of test: deleting relationships
> >> 05.10.2011 13:37:37 get all relationships of the given type
> >> 05.10.2011 13:37:37 delete them all
> >> 05.10.2011 13:38:21 131072 relationships deleted
> >> 05.10.2011 13:38:39 262144 relationships deleted
> >> 05.10.2011 13:38:41 262153 relationships deleted in iteration 1
> >> 05.10.2011 13:38:41 get all relationships of the given type
> >> 05.10.2011 13:38:41 delete them all
> >> 05.10.2011 13:39:12 131072 relationships deleted
> >> 05.10.2011 13:39:22 262135 relationships deleted in iteration 2
> >> 05.10.2011 13:39:22 get all relationships of the given type
> >> 05.10.2011 13:39:22 delete them all
> >> 05.10.2011 13:39:22 0 relationships deleted in iteration 3
> >> 05.10.2011 13:39:22 could expect that one iteration is sufficient
> >> 05.10.2011 13:39:22 to get all relationships of the given types,
> >> 05.10.2011 13:39:22 so that it finished after the second iterations when
> >> deletions == 0
> >> 05.10.2011 13:39:22 if this line gets logged, then there were more than
> two
> >> iterations, which is bad
> >>
> >>
> >> And the testcase is attached as .java-file. Could please somebody take a
> >> look at it and the log and maybe find my mistake or confirm that this is
> >> strange behaviour.
> >>
> >> ciao,
> >> st.p.
> >>
> >> _______________________________________________
> >> Neo4j mailing list
> >> User@lists.neo4j.org
> >> https://lists.neo4j.org/mailman/listinfo/user
> >>
> >>
> >
> >
>
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to