[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [p2-dev] Transaction question / issue
|
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
Henrik Lindberg ---01/28/2009 04:06:53 PM---As I am working on a BackupStore to handle touchpoint actions that
![]()
From: | ![]()
Henrik Lindberg <henrik.lindberg@xxxxxxxxxxxxxx> |
![]()
To: | ![]()
P2 developer discussions <p2-dev@xxxxxxxxxxx> |
![]()
Date: | ![]()
01/28/2009 04:06 PM |
![]()
Subject: | ![]()
[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

