Ticket #301 - implement transaction support using thread local storage
https://fedorahosted.org/389/ticket/301
Resolves: Ticket #301
Bug Description: implement transaction support using thread local storage
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Create a new thread local storage key in dblayer.c
thread_private_txn_stack. This is used to hold the stack of transactions
in the current thread. A stack is used because there may be nested
transactions. The transaction at the head of the stack is the currently
executing one and the parent to use for new nested transactions. When a
new txn is started, it is pushed on the stack to be the new head. When a
txn is commited or aborted, it is popped off the head of the list, and the
old parent transaction is restored in the pblock. Any db backend top level
function must call dblayer_txn_init() to set its txn handle to the current
transaction, and set SLAPI_TXN in the pblock. The txn functions also allow
the txn to be passed in via the pblock. This approach gives us the
flexibility to support LDAP transactions in the future.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no