Great, thanks for the rapid response. It will be easy to use the BackupStore that I have implemented to do checkpointing - but I am not adding that now.
The BackupStore is now implemented and I have JUnit tests for it. I am currently working on integrating it into the NativeTouchpoint with handling of commit, rollback etc.
A question - the BackupStore is useful elsewhere and should perhaps not be in org.eclipse.equinox.internal.p2.touchpoint.natives. Any suggestions where to put it?
On Jan 28, 2009, at 10:21 PM, Simon Kaegi wrote: Thanks Henrik, Great summary and everything looks right. re: - is it possible to rollback only one phase, and then continue? (I think answer is no, but want to make sure). No, currenlty we haven't looked at checkpoints but that might be interesting in a future release. re: EngineSession.rollback() calls Touchpoint.commit() on line 144! Shouldn't this be a call to Touchpoint.rollback? Yes, I noticed and fixed this a couple of days ago. It'salready fixed for M5. You're also right that all the eventually unnecessary action undoing covered up the problem -Simon <graycol.gif>Henrik Lindberg ---01/28/2009 04:06:53 PM---As I am working on a BackupStore to handle touchpoint actions that <ecblank.gif> From: | <ecblank.gif> Henrik Lindberg <henrik.lindberg@xxxxxxxxxxxxxx> | <ecblank.gif> To: | <ecblank.gif> P2 developer discussions <p2-dev@xxxxxxxxxxx> | <ecblank.gif> Date: | <ecblank.gif> 01/28/2009 04:06 PM | <ecblank.gif> Subject: | <ecblank.gif> [p2-dev] Transaction question / issue | As I am working on a BackupStore to handle touchpoint actions that deal with deleting and overwriting files I need to understand how transactions in p2 work. I have studied code, and want to get feedback on that my understanding is correct. - A Touchpoint will receive calls to prepare(), and then to commit() or rollback() at the end of a transaction - The purpose of prepare() is to ensure that all involved resources will be commitable - A call to Touchpoint.initializePhase(... Profile, Phase...) means that the touchpoint gets involved in a transaction for the Profile for a particular phase - A touchpoint should associate any transaction state in the touchpoint properties map - There are no concurrent transactions for a profile - The undo methods on actions are called before the Touchpoint is told to rollback - If something goes wrong - everything should be rolled back for the profile Questions: - is it possible to rollback only one phase, and then continue? (I think answer is no, but want to make sure). Most likely a bug: EngineSession.rollback() calls Touchpoint.commit() on line 144! Shouldn't this be a call to Touchpoint.rollback? It does not matter for the current impl of NativeTouchpoint as it does nothing on commit and rollback, but the EclipseTouchpoint will commit the new configuration instead of rolling back! (it did call undo on all the actions though....) Henrik Lindberg henrik.lindberg@xxxxxxxxxxxxxx _______________________________________________ p2-dev mailing list p2-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/p2-dev _______________________________________________ p2-dev mailing list p2-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/p2-dev
|