diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-11-19 09:34:05 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-11-20 09:45:36 +0100 |
commit | 3b9f19ed919fef2e88b2f92ae541e07bc7379cd1 (patch) | |
tree | 5f7d072e56ab7ee22549051cffcc64a4a3694679 /lib/tdb/common/transaction.c | |
parent | 436b55db1ff238ec467b07a74b088f6fcfaf927c (diff) | |
download | samba-3b9f19ed919fef2e88b2f92ae541e07bc7379cd1.tar.gz samba-3b9f19ed919fef2e88b2f92ae541e07bc7379cd1.tar.bz2 samba-3b9f19ed919fef2e88b2f92ae541e07bc7379cd1.zip |
tdb: add TDB_DISALLOW_NESTING and make TDB_ALLOW_NESTING the default behavior
We need to keep TDB_ALLOW_NESTING as default behavior,
so that existing code continues to work.
However we may change the default together with a major version
number change in future.
metze
Diffstat (limited to 'lib/tdb/common/transaction.c')
-rw-r--r-- | lib/tdb/common/transaction.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c index 501cd62b96..20f2bfc2cd 100644 --- a/lib/tdb/common/transaction.c +++ b/lib/tdb/common/transaction.c @@ -86,12 +86,20 @@ fsync/msync calls are made. - if TDB_ALLOW_NESTING is passed to flags in tdb open, or added using - tdb_add_flags() transaction is enabled. - The default is that transaction nesting is not allowed and an attempt - to create a nested transaction will fail with TDB_ERR_NESTING. + tdb_add_flags() transaction nesting is enabled. + It resets the TDB_DISALLOW_NESTING flag, as both cannot be used together. + The default is that transaction nesting is allowed. + Note: this default may change in future versions of tdb. Beware. when transactions are nested a transaction successfully completed with tdb_transaction_commit() can be silently unrolled later. + + - if TDB_DISALLOW_NESTING is passed to flags in tdb open, or added using + tdb_add_flags() transaction nesting is disabled. + It resets the TDB_ALLOW_NESTING flag, as both cannot be used together. + An attempt create a nested transaction will fail with TDB_ERR_NESTING. + The default is that transaction nesting is allowed. + Note: this default may change in future versions of tdb. */ |