Show Table of Contents
Chapter 65. Parameters for LDBM Back End Transaction Pre- and Post-Operation Functions
The section describes the parameters that the LDBM back end transaction plug-in functions use:
These functions are called inside the database transaction and perform atomic operations. For example, if an error occurs during a pre- or post-operation, you can revert the complete database transaction.
An updated operation, that is performed inside of a transaction plug-in, runs as a child transaction of the enclosing parent transaction. This means:
- The plug-in uses data that other child transactions of the parent transaction already committed. For example:
- A
modifyoperation can use data that another child transaction of the enclosing parent transaction modified and committed. - A
searchoperation returns data that another child transaction of the enclosing parent transaction modified and committed.
- If the plug-in writes to the database, but a subsequent operation fails in the same enclosing parent transaction, the plug-in's write operation is removed. Any aborted transaction at any child level is reverted up to the original update operation's transaction.
To correctly abort the changes in case of an error, plug-ins using the pre- or post-operation transaction type must return a non-zero value if the plug-in operation failed. In case of an error, Red Hat recommended to additionally set the result code (
SALPI_RESULT_CODE) or the return code opreturn (SLAPI_PLUGIN_OPRETURN) in the pblock parameter.
Due to the nature of the LDBM database, deadlocks can occur in database operations. Other database errors cause the transaction to abort and to return the error. However, in case of a deadlock the operation is retried up to 50 times. The back end transaction pre- and post-plug-ins are called as many times as the retry is attempted, while the back end pre- and post-plug-ins are not.
65.1. Pre-Operation Plug-ins
The parameters listed in this section are used with back end transaction pre-operation database plug-in functions.
| Parameter ID | Description |
|---|---|
SLAPI_PLUGIN_BE_TXN_PRE_ADD_FN | This function is called in a database transaction before a database add operation is completed. |
SLAPI_PLUGIN_BE_TXN_PRE_DELETE_FN | This function is called in a database transaction before a database delete operation is completed. |
SLAPI_PLUGIN_BE_TXN_PRE_MODIFY_FN | This function is called in a database transaction before a database modify operation is completed. |
SLAPI_PLUGIN_BE_TXN_PRE_MODRDN_FN | This function is called in a database transaction before a database modify RDN operation is completed. |

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.