Hi Stuart,

thanks for the comments!

Okay, let's go for modified commit() and rollback(). I will make tpc off
by default in ZStorm and have a way to configure it per-store, because
you might don't want to have it on for all stores, for example if they
set the isolation level to autocommit (tpc is not supported), something
like zstorm.set_default_tpc(name, flag), and maybe have a way to
configure it per-transaction too.

Regarding begin(), I think we need it because the ZStorm machinery needs
to call it when during register_store_with_transaction, afaiu you need
to call the DB API level tpc_begin() before issuing any query in the
transaction. So prepare() alone is not enough, unless we are fine with
ZStorm accessing the raw connection directly via
store._connection._raw_connection (but that doesn't seem great).

My idea would be to add a Storm-level Xid class, that you can
instantiate passing the standard XA arguments (format, transaction_id,
branch_qualifier). Then you can pass Xid instances to store.begin(), and
they would be handled transparently.

If you think we should move this to the mailing list, I'll do.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/132485

Title:
  Storm should try to support two-phase commit where possible

To manage notifications about this bug go to:
https://bugs.launchpad.net/landscape/+bug/132485/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to