diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-07-29 14:47:29 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-08-04 16:43:06 +0930 |
commit | 166e74a8b1ebb90275fed90abd22dc061c77accc (patch) | |
tree | 144e6229ed2fb8d21c640da6323369a2f159a437 /ctdb/lib/tdb/docs/README | |
parent | 690f1537f031b05ae8013d8eea4136eb9c7bf163 (diff) | |
download | samba-166e74a8b1ebb90275fed90abd22dc061c77accc.tar.gz samba-166e74a8b1ebb90275fed90abd22dc061c77accc.tar.xz samba-166e74a8b1ebb90275fed90abd22dc061c77accc.zip |
Port from SAMBA tdb:
commit b90863c0b7b860b006ac49c9396711ff351f777f
Author: Howard Chu <hyc@highlandsun.com>
Date: Tue Mar 31 13:15:54 2009 +1100
Add tdb_transaction_prepare_commit()
Using tdb_transaction_prepare_commit() gives us 2-phase commits. This
allows us to safely commit across multiple tdb databases at once, with
reasonable transaction semantics
Signed-off-by: tridge@samba.org
(This used to be ctdb commit 4c3dac215a088947f645f727343997f5d47e3260)
Diffstat (limited to 'ctdb/lib/tdb/docs/README')
-rw-r--r-- | ctdb/lib/tdb/docs/README | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ctdb/lib/tdb/docs/README b/ctdb/lib/tdb/docs/README index 63fcf5e049b..454e4ba032b 100644 --- a/ctdb/lib/tdb/docs/README +++ b/ctdb/lib/tdb/docs/README @@ -236,3 +236,11 @@ int tdb_transaction_commit(TDB_CONTEXT *tdb) commit a current transaction, updating the database and releasing the transaction locks. +---------------------------------------------------------------------- +int tdb_transaction_prepare_commit(TDB_CONTEXT *tdb) + + prepare to commit a current transaction, for two-phase commits. + Once prepared for commit, the only allowed calls are + tdb_transaction_commit() or tdb_transaction_cancel(). Preparing + allocates disk space for the pending updates, so a subsequent + commit should succeed (barring any hardware failures). |