From: Peter G. <pe...@fs...> - 2004-02-06 00:15:58
|
> I think there's the most general interest in optimistic locking, i.e., > rows have a timestamp, and if the timestamp has been updated since the > object was fetched/synced you get some sort of conflict exception when > you try to commit changes. This is implemented almost entirely outside > of the database, so cross-database compatibility should be easy. Though > the rest may not be exactly easy. This is not what I'm looking for though. > Anyway, it seems a lot better than table locking, and it's a bit better Some databases only supports table locking, like the old mysql classic backend (don't know if that is still the case). Any good database would support row looking, only they support various sorts of modes. Table locking can be good to have if you wish to sum a part of or an entire table and then write the result without allowing any changes to the table. Row locking sort of works like your suggestion, only blocking, which can be fine if the transaction is really fast (< 500ms) and you really want to keep consistancy, but not fling an error out because they couldn't both write within the same 200 ms or so. > right (on the application level) without transactions. In fact, without > transactions I think you can't do it, because you might send one update, > and the second update (which is required for consistency) could fail. No, can't be done without transactions. Or, any implementation of this that I have seen always requires a transaction ending, either by commit or transaction close. > >may be considered CRITICAL. > > Yeah, that'd be cool. Is there a logging module backported to 2.2? No, I think it's not. I can't find it in the 2.2 docs anyway and there's no python logging extra module in Debian. (good measurement, hehe) Are we trying to be 2.2 compatible? Then SQLObject could include a wrapper which implements the logger, handler, formatter and record. I can write something and send a patch for all of it. If you run 2.2 the wrapper is used, if 2.3 then logging module is used. /Peter |