From bfccc4590dc94b37258b7225d153c4c01d1a28d6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 3 Sep 2009 18:29:58 +1000 Subject: always use prepare_commit in ldb transaction commits if possible The reason we need this is to make multi-tdb transactions safe, with the partition module. The linked_attributes and repl_meta_data modules now do extra processing when the transaction ends, and that processing can fail. When it fails we need to cancel the transaction, which we can only do if the hook is on the prepare commit instead of the end transaction call. Otherwise the partition module cannot ensure that no commit has been done on another partition. --- source4/lib/ldb/include/ldb_module.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/ldb/include/ldb_module.h') diff --git a/source4/lib/ldb/include/ldb_module.h b/source4/lib/ldb/include/ldb_module.h index cc24d8a6c0..1d6329ca2f 100644 --- a/source4/lib/ldb/include/ldb_module.h +++ b/source4/lib/ldb/include/ldb_module.h @@ -127,6 +127,7 @@ int ldb_next_request(struct ldb_module *module, struct ldb_request *request); int ldb_next_start_trans(struct ldb_module *module); int ldb_next_end_trans(struct ldb_module *module); int ldb_next_del_trans(struct ldb_module *module); +int ldb_next_prepare_commit(struct ldb_module *module); int ldb_next_init(struct ldb_module *module); void ldb_set_errstring(struct ldb_context *ldb, const char *err_string); -- cgit