#523 support slapi transactions
Closed: wontfix None Opened 11 years ago by rmeggins.

Extended operations have no way to group modify operations in a single transaction. We need to expose database transactions to the slapi layer e.g.

int
my_extop_plugin(pb)
{
...
slapi_txn_start();
slapi_modify_internal();
...
slapi_add_internal();
...
if (result == success) {
    slapi_txn_commit();
} else {
    slapi_txn_abort();
}

FYI. We exposed backend transaction as follows. So far, just memberof_fixup_task_thread uses it.

{{{
"slapi-plugin.h"
/
* Start database transaction

* \param pb Pblock which is supposed to set (Slapi_Backend
) to SLAPI_BACKEND
* \return 0 if successful
* \return Non-zero if an error occurred

* \see slapi_back_transaction_commit
* \see slapi_back_transaction_abort
/
int slapi_back_transaction_begin(Slapi_PBlock *pb);
/

* Commit database transaction

* \param pb Pblock which is used to start transaction
* \return 0 if successful
* \return Non-zero if an error occurred

* \see slapi_back_transaction_start
* \see slapi_back_transaction_abort
/
int slapi_back_transaction_commit(Slapi_PBlock
pb);
/
* Abort database transaction

* \param pb Pblock which is used to start transaction
* \return 0 if successful
* \return Non-zero if an error occurred

* \see slapi_back_transaction_commit
* \see slapi_back_transaction_abort
/
int slapi_back_transaction_abort(Slapi_PBlock
pb);

}}}

Metadata Update from @nhosoi:
- Issue assigned to rmeggins
- Issue set to the milestone: 1.3.0.a1

7 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/523

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata