Bug: Transaction is Committed instead of Rollback'ed

Derek Atkins warlord@MIT.EDU
14 Mar 2001 17:28:39 -0500


Dave Peticolas <dave@krondo.com> writes:

> Derek Atkins writes:
> > Actually, I think I did just figure out the "right" way of doing this.
> > Split out the force-change code into a second function,
> > xaccTransDoRollback().  Then have xaccTransRollback() see if the
> > backend has a rollback function; if so, just call that; if not, just
> > call xaccTransDoRollback().  Then the backend can disable itself and
> > then call the DoRollback() function to modify the engine without
> > causing undue commit_edit calls.
> 
> Or put the backend detection in xaccTransRollback and then the backend
> can choose to use xaccTransDoRollback without disabling itself?

I'm not convinced it would want to do that.  In the case where it runs
gets through the force_it code, the transaction is changing locally
but it's really not changed in the backend, so you dont need to
'commit' any changes anyways.

> > This does put the onus of correcting the engine transaction on the
> > backend, but I think that's fine.  Currently none of the backends
> > (except mine) even support the rollback method.
> 
> > Dave, would you like to work on this or would you like me to do it and
> > just submit patches along with everything else?
> 
> Go ahead and submit it with a patch. Please put xaccTransDoRollback in
> the TransactionP.h header.

Will-do.  Thanks,

> dave

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available