This function terminates transaction logging when logging MCO_TRANSLOG_PIPE was enabled and the pipe has become full.
MCO_RET mco_translog_terminate( mco_db_h db )
| db | Database connection handle |
This function should be called to terminate transaction logging when
logging MCO_TRANSLOG_PIPEwas enabled and the pipe has become full, causingMCO_READ_WRITEtransactions to block because there’s no room in the pipe. This can happen if something has gone wrong with the pipe reader (e.g. it crashed). In this case,mco_translog_stop()cannot be used because it writes an end-of-log marker in the pipe.If
MCO_TRANSLOG_PIPEwas not enabled, this function is identical tomco_translog_stop().
| MCO_S_OK | The TL runtime was initialized successfully. |
| MCO_E_TL_NOT_STARTED | Transaction logging was not started. |
| MCO_E_TL_IO_ERROR | Disk IO error. |
| MCO_E_TL_PIPE_LOST | All connections to a pipe were closed and its data was lost. |
| MCO_E_TL_PIPE_TERM | Reader returned from function mco_translog_iterate() before the log was finished. It terminated logging by returning a value other than MCO_S_OK to the callback function. |
Note: The logging process will always be stopped after calling function mco_translog_terminate() - even if an error occurs.
mco_translog_terminate() closes the pipe(s) and causes the readers to drop out at the moment it is called. The function mco_translog_stop() also stops logging gracefully, but the pipe will continue to be used by the reader until it has read the rest of the pipe content. With mco_translog_stop(), this activity can not be controlled by the writer.
In other words, mco_translog_terminate() terminates logging, the same as mco_translog_stop() for writer side, but the reader side instantly returns from the function mco_translog_iterate() with error MCO_E_TL_PIPE_TERM.