From b90863c0b7b860b006ac49c9396711ff351f777f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 31 Mar 2009 13:15:54 +1100 Subject: 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 --- lib/tdb/docs/README | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/tdb/docs/README') 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). -- cgit