Hi Tobias On 16 Jun 2009, at 20:13, Tobias Ivarsson wrote:
> Are you doing multi threaded access to the batch inserter API?! > > In that case you are on uncertain waters. Yeah I know, it was my bad :-) Would be nice to have a safety net on this class for when we do silly things, either synchronized or multiple access checks .... anyway thanks Tobias, loving Neo4J so far. Neil. > The batch insertion mode is for > bulk loading of initial data, not something you use in the actual > running > application. There really isn't much to gain from feeding the batch > inserter > from multiple threads, it's better to have multiple threads doing > computation, if you need to do that in your batch processing, and > then have > one writer thread reading from a queue and feeding the batch inserter. > > I can see why the problem occurs. Since the batch insertion API is > intended > for single threaded use it uses the unsynchronized implementation of > ArrayMap for speed. When your application is accessing it through > multiple > threads there is a chance that you access it in an inconsistent > state, and > therefore end up with the exception you reported. > > Still, it is at least not a very descriptive exception, and we might > consider doing something to improve this. So thank you for reporting > the > problem. > > Cheers, > Tobias > > On Tue, Jun 16, 2009 at 8:59 PM, Neil Ellis > <neil.el...@mangala.co.uk>wrote: > >> That NPE is probably due to multi-threaded access btw. so maybe not a >> priority to fix ;-) >> >> _______________________________________________ >> Neo mailing list >> User@lists.neo4j.org >> https://lists.neo4j.org/mailman/listinfo/user >> > > > > -- > Tobias Ivarsson <tobias.ivars...@neotechnology.com> > Hacker, Neo Technology > www.neotechnology.com > Cellphone: +46 706 534857 > _______________________________________________ > Neo mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user