Turns out to be a bug indeed. A fix for this will go into 1.4. Thank you, Mattias
2011/6/29 Mattias Persson <[email protected]> > AFAIK there are no differences between the two. The read-only version makes > sure you cannot perform modifications to the graph, but otherwise they use > the same calls and code. > > Regarding the NonWritableChannelException. I see that FileChannel.write() > is called (even though nothing has changed), even when in read-only mode > when releasing persistence windows for the persistence window implementation > used for windows/non-memory-mapped environments. That should be the culprit > in here. I'll try to reproduce it locally. > > > 2011/6/29 Paul Bandler <[email protected]> > >> The problem resulting in the NonWritableChannelException occurred on >> Windows although I need to run on Solaris as well as Windows. >> >> Actually I must apologise for saying that the previously reported issue >> didn't solicit a response - I see that Johan Svensson did just today and >> suggests it might be fixed in the new milestone release. >> >> My questions regarding what actual effect using the >> EmbeddedReadOnlyGraphDatabase is still relevant however...? >> >> On 28 Jun 2011, at 21:21, Rick Bullotta wrote: >> >> > Paul, are you on windows or Linux? >> > >> > ----- Reply message ----- >> > From: "Paul Bandler" <[email protected]> >> > Date: Tue, Jun 28, 2011 1:34 pm >> > Subject: [Neo4j] Advantages of EmbeddedReadOnlyGraphDatabase ? [was >> NonWritableChannelException] >> > To: "Neo4j user discussions" <[email protected]> >> > >> > Are there advantages in accessing the database via the >> EmbeddedReadOnlyGraphDatabaseclass in a read-only application? >> > >> > A week or so back I posted the message below regarding a problem >> experienced while using EmbeddedReadOnlyGraphDatabase that regrettably >> didn't solicit any responses and since then I've been using the standard >> read-write EmbeddedGraphDatabase without repeat of the same issue even >> though my application is read-only. Are there any avoidable performance >> penalties using EmbeddedGraphDatabase in place of >> EmbeddedReadOnlyGraphDatabase? >> > >> > Along a similar lines, as my application is read-only, I'm not doing any >> explicit transaction management - is there any reason why I should? >> > >> > >> > >> > Begin forwarded message: >> > >> > > From: Paul Bandler <[email protected]> >> > > Date: 21 June 2011 12:22:56 GMT+01:00 >> > > To: Neo4j user discussions <[email protected]> >> > > Subject: [Neo4j] NonWritableChannelException >> > > Reply-To: Neo4j user discussions <[email protected]> >> > > >> > > The above exception is thrown from the call stack indicated below >> while traversing a neo4j graph using the EmbededReadOnly database. Using >> 1.4M04. >> > > >> > > The application is running with 1gb of heap with defaulting all other >> parameters except cache_type=weak on windows. >> > > >> > > I found some reports of this exception being thrown at shutdown back >> > > in January but this is not happening at shutdown and I could find no >> posted resolution of that thread anyway. >> > > >> > > Can anyone suggest what the cause if this exception is? >> > > >> > > Thanks >> > > >> > > Paul >> > > >> > >> >> > > >> > >> Exception in thread "main" >> java.nio.channels.NonWritableChannelException >> > >> at sun.nio.ch.FileChannelImpl.write(Unknown Source) >> > >> at >> org.neo4j.kernel.impl.nioneo.store.AbstractPersistenceWindow.writeOut(AbstractPersistenceWindow.java:104) >> > >> at >> org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.refreshBricks(PersistenceWindowPool.java:536) >> > >> at >> org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.acquire(PersistenceWindowPool.java:128) >> > >> at >> org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.acquireWindow(CommonAbstractStore.java:526) >> > >> at >> org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:327) >> > >> at >> org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114) >> > >> at >> org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97) >> > >> at >> org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108) >> > >> at >> org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603) >> > >> at >> org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:399) >> > >> at >> org.neo4j.kernel.impl.core.IntArrayIterator.hasNext(IntArrayIterator.java:93) >> > >> at >> org.neo4j.kernel.impl.core.NodeImpl.getSingleRelationship(NodeImpl.java:218) >> > >> >> > > _______________________________________________ >> > > Neo4j mailing list >> > > [email protected] >> > > https://lists.neo4j.org/mailman/listinfo/user >> > >> > _______________________________________________ >> > Neo4j mailing list >> > [email protected] >> > https://lists.neo4j.org/mailman/listinfo/user >> >> _______________________________________________ >> Neo4j mailing list >> [email protected] >> https://lists.neo4j.org/mailman/listinfo/user >> > > > > -- > Mattias Persson, [[email protected]] > Hacker, Neo Technology > www.neotechnology.com > -- Mattias Persson, [[email protected]] Hacker, Neo Technology www.neotechnology.com _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

