summaryrefslogtreecommitdiff
path: root/lib/tdb/docs
diff options
context:
space:
mode:
authorHoward Chu <hyc@highlandsun.com>2009-03-31 13:15:54 +1100
committerAndrew Tridgell <tridge@samba.org>2009-03-31 13:15:54 +1100
commitb90863c0b7b860b006ac49c9396711ff351f777f (patch)
treef284c69be0d0a9bc8794027cd55135474d64b5c5 /lib/tdb/docs
parent4b8e4ea7286f045effb6feb4c7bf8c5ef4ed2f9b (diff)
downloadsamba-b90863c0b7b860b006ac49c9396711ff351f777f.tar.gz
samba-b90863c0b7b860b006ac49c9396711ff351f777f.tar.bz2
samba-b90863c0b7b860b006ac49c9396711ff351f777f.zip
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
Diffstat (limited to 'lib/tdb/docs')
-rw-r--r--lib/tdb/docs/README8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/tdb/docs/README b/lib/tdb/docs/README
index 63fcf5e049..454e4ba032 100644
--- a/lib/tdb/docs/README
+++ b/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).