[MTOS-dev] No transactions in MT / Data::ObjectDriver?
Hirotaka Ogawa
hirotaka.ogawa at gmail.com
Sat Mar 1 02:44:01 PST 2008
On Sat, Mar 1, 2008 at 5:32 AM, Alvar Freude <alvar at a-blast.org> wrote:
> Hi,
>
> it seems to me, that MT::ObjectDriver does *not* use SQL transactions in
> the database backends. Is this correct? When yes: why are no transactions
> used?
Correct. I think the reason is:
- Simplicity; (We just believe) any operations on MT::Object should
be atomic as well as uniform. That is, each MT::Object operations
consists of single transaction section, and any MT::Objects, e.g.
MT::Entry and MT::Session, have exactly same semantics on each
operations.
- Availability; InnoDB is not always available for users, unlike
MyISAM, because of historical reason.
As you wrote, we can employ InnoDB and make transaction sections much
larger, for example, each requests is served as a single transaction.
I don't think well but, do we need to update MT::Session sychronously
as well as update other MT::Objects asynchronously? If so, such
nonuniform accesses should be properly supported in D::OD framework.
> I found no $dbh->commit method call in the libs, the Database connections
> are initialised with AutoCommit (line 53 in Data::ObjectDriver), und with
> MySQL the junky MyISAM tables are used (which does not support
> transactions).
>
> I can't believe that no transactions are used, because this can result in
> data inconsistency and corrupted databases. So, perhaps I am wrong and
> have overseen something ...
>
>
> Ciao
> Alvar
>
> --
> ** Alvar C.H. Freude, http://alvar.a-blast.org/
> ** http://www.assoziations-blaster.de/
> ** http://www.wen-waehlen.de/
> ** http://odem.org/
>
> _______________________________________________
> MTOS-dev mailing list
> MTOS-dev at sixapart.com
> http://www.sixapart.com/mailman/listinfo/mtos-dev
>
>
--
Hirotaka Ogawa makes no sense.
http://as-is.net/blog/
More information about the MTOS-dev
mailing list