I trying to decide how best to manage operations belonging to a transaction. When posting an update operation into a transaction, a success gets returned and then the operation (or copy) needs to get added to c_txn_ops for later processing during the settlement (commit or abort).
In the old days (malloc), after sending the success I could cause the operation to be added to the list and avoid the slap_op_free() call. Then on commit/abort, I could resend the operation to the backend. This is no longer possible when the thread-specific slab allocator. So it seems I have three choices. One, I could disable the slab allocator for the connection when a transaction is being specified, thereby allow me to manage things the old way. Two, I could duplicate the operation when the success is returned and add to the c_txn_ops list for later settlement processing. Three, I could after sending the success, free all the operation except its c_ber, add that to the c_txn_ops list, and then resend the operation to the frontend. At present, I am favoring the first approach as it avoids having to duplicate the operation and/or reparse the PDU. I would only disable the slab for update operations performed in a connection actively specifying a transaction (regardless if the update request is part of the transaction or not). Other approaches to consider? Comments?
