Hi Chris, On Tue, Nov 9, 2010 at 7:34 PM, Chris Gioran <chris.gio...@gmail.com> wrote: >> Chris, >> Awesome! I think the next step would be to start testing things when >> neo4j needs to recover, rollback etc, I think this is where the >> problems arise :) >> >> Also, any chance of making a maven project out of it and having the >> project as a test component somewhere in the Svn repo, so it can be >> run as part of the QA process for releases etc? > > OK, so the plan I have in my mind is this: > > - Do runs to see what problems exist when rolling back/starting in > recovery mode with the only resource being neo. > - See how the whole thing works when another XA compatible resource is > thrown in the mix, probably a RDBMS, checking that 2PC works.
Yes, 2PC is what needs to be tested since on a 1PC the xa resource can during recovery figure out if a transaction should be committed or not. For a prepared 2PC transaction the global TM has to tell the resource to commit or rollback during recovery. Create a test that does the following: o create a transaction and enlist two resources (for example nioneodb and lucene-index, create a node and index it) o let the TM prepare both resources o let the TM send commit to one resource but crash the system before commit is sent to the other resource The system is now in a inconsistent state. One resource will have committed the changes and the other is just prepared. The global TM should detect this while doing recovery and invoke recover() on the appropriate resources and tell them what to do with the transactions that are in prepared state. How the global TM should get hold of a XaResource (creating it if needed) to invoke recover while investigating its transaction log is not really specified. Everyone seems to hack their own solution (JNDI, serialization to disk etc). If you can get the above test case working using other TMs together with Neo4j would be great! Regards, Johan > - Find the least intrusive way of making neo fit in the picture, in > terms of configuration/code changes etc, approve and commit those. > - Write test cases and a maven project so that it can be integrated in > the release cycle to be checked for correct functionality. > - After that probably I would like to fill in the gaps so that from an > app server I can do a container managed tx over a jdbc connection and > a neo connection. After all, this is the ultimate purpose of this > exercise. > > I will fill you in as I go through each of the above. Thanks for your time. > > cheers, > CG > _______________________________________________ > 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