Re: [CDBI] Re: aborting transactions and clearing the live object index

[prev] [thread] [next] [Date index for 2005/10/19]

From: Bill Moseley
Subject: Re: [CDBI] Re: aborting transactions and clearing the live object index
Date: 19:24 on 19 Oct 2005
On Wed, Oct 19, 2005 at 03:05:59PM -0400, Edward J. Sabol wrote:
> Bill Moseley wrote:
> > I'm using the transaction example from the wiki[1] and one thing
> > I'm wondering is if on failed transactions it should do
> >
> > $class->clear_object_index;
> >
> > Or, really the question is: is there's a reason that should not be done?
> 
> That's an excellent point! Clearing the entire object index seems like
> overkill. Ideally, you should only need to clear out the objects that were
> affected in the transaction, but I suppose that could be hard to determine in
> some cases, so perhaps just clearing the whole object index is the best thing
> to do?

I don't expect transactions to fail.  I try and look for problems
before running the transaction.  So the overhead of clearing the
entire index/cache shouldn't happen too often.

Under catalyst, where the croak is caught and an error is displayed.
It's odd to then make a request for showing that item again and see the
incorrect column data displayed.  Confusing because the error said
that the database couldn't be updated (e.g. due to text in an integer
column), but now it's showing that data.

Maybe others are using do_transaction in a different way?


        -- 
        Bill Moseley
moseley@xxxx.xxx


_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

Re: [CDBI] Re: aborting transactions and clearing the live object index
Bill Moseley 19:24 on 19 Oct 2005

Generated at 19:52 on 24 Oct 2005 by mariachi v0.52