Re: TEMP columns not populated by sth_to_objects in 0.96

[prev] [thread] [next] [Date index for 2004/06/09]

From: Charles Bailey
Subject: Re: TEMP columns not populated by sth_to_objects in 0.96
Date: 22:19 on 09 Jun 2004
--On Wednesday, June 9, 2004 11:33 PM +0200 David Jack Olrik 
<david@xxxxx.xx> wrote:

>
> On Jun 9, 2004, at 19:04, Charles Bailey wrote:
>> The problem is that if the data in core doesn't match that in the db,
>> it may mean that the object in core is being updated (but the update
>> hasn't been committed yet), in which case you don't want to overwrite
>> the update with what's in the db.
>
> I disagree, if you fetch the object again, you want a fresh copy of the
> object. If you do not want a fresh copy, changes are that something is
> wrong with the structure of your code i.e. you should have commited
> before fetching from the db again.

That's a reasonable design decision to make, iff your code is 
single-threaded, iff it's guaranteed to complete a task before starting 
another (i.e. not timesliced), iff the data in core aren't shared, and iff 
you can guarantee that nothing internal to any of the classes you use will 
trigger a fetch.

My expectation is that for >90% of applications using CDBI, no collisions 
will occur: there won't be any pending-update issues, or the application 
won't re-fetch data it already has.  In the remaining minority, there may 
be no single solution, as the "right" choice may vary from case to case. 
Protecting against lost data in an update (which will appear to complete 
successfully) seems to me the safer default action, but that may just be my 
bias.

--
Regards,
Charles Bailey  < bailey _at_ newman _dot_ upenn _dot_ edu >
Newman Center at the University of Pennsylvania

(message missing)

TEMP columns not populated by sth_to_objects in 0.96
David Jack Olrik 08:54 on 08 Jun 2004

object caching and mod_perl
jason scott gessner 13:28 on 08 Jun 2004

Re: object caching and mod_perl
Tony Bowden 13:46 on 08 Jun 2004

Re: object caching and mod_perl
Perrin Harkins 14:02 on 08 Jun 2004

Re: object caching and mod_perl
jason scott gessner 14:11 on 08 Jun 2004

Re: object caching and mod_perl
Edward J. Sabol 14:52 on 08 Jun 2004

Re: object caching and mod_perl
jason scott gessner 16:31 on 11 Jun 2004

Re: TEMP columns not populated by sth_to_objects in 0.96
Charles Bailey 22:19 on 09 Jun 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52