This function terminates transaction logging when logging with
MCO_TRANSLOG_PIPE was enabled and the pipe has
become full.
MCO_RET mco_translog_terminate(mco_db_h db);
db
This function should be called to terminate transaction logging when logging with
MCO_TRANSLOG_PIPEwas enabled and the pipe has become full, causingMCO_READ_WRITEtransactions to block because there is 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
MCO_E_TL_NOT_STARTED
MCO_E_TL_IO_ERROR
MCO_E_TL_PIPE_LOST
MCO_E_TL_PIPE_TERM
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 the 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 cannot be
controlled by the writer.
In other words, mco_translog_terminate() terminates logging, the same as
mco_translog_stop() on the writer side, but the reader side instantly
returns from the function mco_translog_iterate() with the error
MCO_E_TL_PIPE_TERM.