[patch 0/8] Patch Preview: Rewrite of Transaction Begin-Commit-Rollback implementations

c.shoemaker at cox.net c.shoemaker at cox.net
Thu Mar 2 00:08:09 EST 2006


This patch series is a reimplementation of transactional semantics for 
Transactions.  There are plenty of notes for the individual patches so as a 
summary I'll try to highlight what I think is the most important change:

There's an important but subtle different between an object's properties and
its relations.  From a schema-perspective the object relations should be 
implicit in the object's properties.  For example, the Split has an Account
property.  There is a many-to-one relation between Splits and Accounts.

During an in-progress edit, the object's properties are changed in-place, with
enough state saved-away to enable rollback.  But the object's relations, i.e.
the 'many' side of the many-to-one relation doesn't need to be updated until 
the edit is commited.

The main behavioral change of this series is that event generation for edits
is delayed until commit-time.  Unfortunately, right now, the register depends 
on receiving more events than is semantically correct, for both the commit and
rollback cases, so we oblige for now.

When testing for breakage, I noticed that one side-effect of this patch series
seems to be fixing the "magically-appearing Orphan account when opening a 
register" bug.

Also note that Lots and capgains objects have never been correctly integrated
into the begin-commit edit-block.  I didn't intentionally change their behavior
but I also didn't test them very thoroughly.  My sense is that they would fix 
more naturally into the new structure, but I'm biased because the old structure
just seemed overly-complex to me.

Anyway, take a look and speak up if anything seems out-of-place.

-chris


--


More information about the gnucash-devel mailing list