[MTOS-dev] Making MT Transaction Safe

Alvar Freude alvar at a-blast.org
Tue Mar 11 01:31:21 PDT 2008


Hi,

-- Hirotaka Ogawa <hirotaka.ogawa at gmail.com> wrote:

>>  >  Why not enabling transactions by default, when an appropriate
>>  >  RDBMS or table type is used?
>>
>>  Because, no commits and rollbacks are inserted into MT code.  That is,
>>  no changes occurs if enabling this option.

I mean: when everything works with transactions, it sounds better to 
enable them by default. When not working, it is surely better not to 
enable it ;-)


> Or, we can extend MT::Object->save() method so as to store data with
> commits and rollbacks by default, and store without commits/rollbacks
> optionally.  For example, $obj->save() to be committable write, and
> $obj->save({ nocommit => 1}) to be non-committable write.
>
> Ah, this may be a good idea.  We can make MT transaction-safe
> gradually and safely.

yes, this sounds better!

What about exception handling: is there something usual in MT, like the 
usual DBI eval + commit/rollback block?

Perhaps something similar should be added.


>>  >  hmmm, and why not selecting InnoDB as default?
[...]
>>  Why can it be default?
>>
>>  I've just made it possible to try using transaction feature for MySQL
>>  people.  Before making it be default, we need to support doing
>>  "transactions" and altering MyISAM tables to InnoDB, and so on.

same as above: it should not be the default until it is ready, sure! :)

But InnoDB can also be used with AutoCommit => 1, like PostgreSQL.


Ciao
  Alvar

-- 
** Alvar C.H. Freude, http://alvar.a-blast.org/
** http://www.assoziations-blaster.de/
** http://www.wen-waehlen.de/
** http://odem.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://www.sixapart.com/pipermail/mtos-dev/attachments/20080311/9f2945f3/attachment-0001.bin 


More information about the MTOS-dev mailing list