dsmEndTxn
The dsmEndTxn function call ends an IBM® Storage Protect transaction.
Pair the dsmEndTxn function call with dsmBeginTxn to identify the call or set of calls that are considered a transaction.
The application client can specify on the dsmEndTxn call whether the transaction must be committed or ended.
Perform all of the following calls within the bounds of a transaction:
- dsmSendObj
- dsmSendData
- dsmEndSendObj
- dsmDeleteObj
Syntax
dsInt16_t dsmEndTxn (dsUint32_t dsmHandle,
dsUint8_t vote,
dsUint16_t *reason); Parameters
- dsUint32_t dsmHandle (I)
- The handle that associates this call with a previous dsmInitEx call.
- dsUint8_t vote (I)
- Indicates whether the application client commits all the actions
that are done between the previous dsmBeginTxn call and this
call. The following values are possible:
UseDSM_VOTE_COMMIT /* commit current transaction */ DSM_VOTE_ABORT /* roll back current transaction */DSM_VOTE_ABORTonly if your application finds a reason to stop the transaction. - dsUint16_t *reason (O)
- If the call to dsmEndTxn ends with an error, or the value of
voteis not agreed to, this parameter has a reason code that indicates why the vote failed. The return code for the call might be zero, and the reason code might be non-zero. Therefore, the application client must always check for errors on both the return code and the reason (if (rc || reason)) before you can assume a successful completion.If the application specifies a vote of
DSM_VOTE_ABORT, the reason code isDSM_RS_ABORT_BY_CLIENT (3). See API return codes source file: dsmrc.h for a list of the possible reason codes. Numbers 1 through 50 in the return codes list are reserved for the reason codes. If the server ends the transaction, the return code isDSM_RC_CHECK_REASON_CODE. In this case, the reason value contains more information on the cause of the abort.
Return codes
The return code numbers are provided in parentheses ( ).
| Return code | Explanation |
|---|---|
DSM_RC_ABORT_CRC_FAILED (236) |
The CRC that was received from the server does not match the CRC that was calculated by the client. |
DSM_RC_INVALID_VOTE (2011) |
The value that was specified for vote is not valid. |
DSM_RC_CHECK_REASON_CODE
(2302) |
The transaction was aborted. Check the reason field. |
DSM_RC_ABORT_STGPOOL_COPY_CONT_NO
(241) |
The write to one of the copy storage pools failed, and the IBM Storage Protect storage pool option COPYCONTINUE is set to NO. The transaction terminates. |
DSM_RC_ABORT_RETRY_SINGLE_TXN
(242) |
This abort code indicates that the
current transaction was aborted because of a problem during a store
operation. The problem can be resolved by sending each file in an
individual transaction. This error is typical in the following circumstances:
|