[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [p2-dev] Transaction question / issue
|
re: use prepare for heavy lifting instead of commit
Yes, that's the goal (and I'm excited you're picking up all this - much appreciated).The problem is that we don't have decent mechanisms in place to pre-backup and then restore our state in Framework Admin. Still go ahead with Native as we have to start somewhere.
re:Backupstore
Yes, definitely usable in lots of places. For now I'd stick to small and focused as we can always move it around after.
Henrik Lindberg ---01/28/2009 05:53:30 PM---One more thing - I noticed that neither EclipseTouchpoint nor NativeTouchpoint makes use of the prepare() call. Instead, the Ec
![]()
From: | ![]()
Henrik Lindberg <henrik.lindberg@xxxxxxxxxxxxxx> |
![]()
To: | ![]()
P2 developer discussions <p2-dev@xxxxxxxxxxx> |
![]()
Date: | ![]()
01/28/2009 05:53 PM |
![]()
Subject: | ![]()
Re: [p2-dev] Transaction question / issue |
One more thing - I noticed that neither EclipseTouchpoint nor NativeTouchpoint makes use of the prepare() call.
Instead, the EclipseTouchpoint performs all writing in commit().
Shouldn't it do a check that it can write the data on prepare()? I.e leave as few as possible causes for an error to occur when committing?
With the current implementation - one of the touchpoints may commit and the other fail.
Henrik Lindberg
henrik.lindberg@xxxxxxxxxxxxxx
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
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev
![GIF image](gif92sRpeAcQT.gif)
![GIF image](gif8ZFaH3aKdg.gif)