[Neo4j] TransactionDataImpl.deletedNodes not an ordered set
Hi, We use the Neo4JCommitListener to synchronize some neo4j data back to a database. I have an issue when trying to deal with the delete events. I delete nodes in a particular order in neo4j (it's a nested set, so down-up ), but when getting the events in the commitListener the order is not respected (random), this is because deletedNodes is not an ordered set. private final CollectionNode deletedNodes = new HashSetNode(); I think it would make sense to have that ordered, like: private final CollectionNode deletedNodes = new LinkedHashSetNode(); Otherwise I don't see a reliable way to resolve this kind of issues. Note that the same issue probably applies to the other collections in there as well. Thanks -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/TransactionDataImpl-deletedNodes-not-an-ordered-set-tp3571499p3571499.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register and consider posting at https://groups.google.com/forum/#!forum/neo4j Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
Hi Chris. I don't mean to pressure, I write OSS myself and I know time is available whenever it is, so i just have some quick questions about this issue. Basically I just need to decided whether to shelf this feature of our project for now or if i can get any idea on how much work / how long it would take to get it working. 1) Do you think it's an issue with atomikos itself and I should I bring the issue to them ? 2) Is that something that would be fixed in neo4j itself, if so do you have any rough estimates ? 3) Is there some sort of workaround you could think of that I could implement ? Any other suggestions or ammount of work/time needed would be appreciated. Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3411656.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] getProperty() on deleted Node in TransactionEventHandler.beforeCommit()
We have an implementation of TransactionEventHandlerNeo4JTransaction in the method beforeCommit() I would like to use getProperty(nodeType) .. so I can take proper action. Now in the case of a deletion event, it won't let me call it and throws an exception. I'm surprised by this exception has this is beforeCommit() and the node is not delete YET. public Neo4JTransaction beforeCommit(TransactionData data) throws Exception { for (Node deletedNode : data.deletedNodes()) { boolean b = deletedNode.hasproperty(type) // Fails with Exception } } Caused by: java.lang.IllegalStateException: Node[9] has been deleted in this tx at org.neo4j.kernel.impl.core.LockReleaser.getCowPropertyRemoveMap(LockReleaser.java:450) at org.neo4j.kernel.impl.core.NodeManager.getCowPropertyRemoveMap(NodeManager.java:991) at org.neo4j.kernel.impl.core.Primitive.hasProperty(Primitive.java:278) at org.neo4j.kernel.impl.core.NodeProxy.hasProperty(NodeProxy.java:150) Is this expected / a bug ? Any alternatives ? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/getProperty-on-deleted-Node-in-TransactionEventHandler-beforeCommit-tp3320791p3320791.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] getProperty() on deleted Node in TransactionEventHandler.beforeCommit()
To reply to myself: I found out that i was able to get the properties of the to be deleted node in data.removedNodeProperties() with the value being in previouslyCommitedValue() -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/getProperty-on-deleted-Node-in-TransactionEventHandler-beforeCommit-tp3320791p3321945.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user