mco_trans_rt_rollback_deadline_check

Predefined callback function for real-time transaction deadline monitoring with rollback time estimation.

Prototype

    MCO_RET mco_trans_rt_rollback_deadline_check(
        /*IN*/ mco_trans_h t
    );

Arguments

t
Transaction handle.

Description

This function is a predefined callback implementation that enables the adaptable deadline policy in eXtremeDB/rt. To use this policy, the application must register this function as a callback using mco_trans_rt_register_callback().

The callback evaluates whether sufficient time remains to complete a transaction rollback before the deadline expires. It returns:

If MCO_E_INTERRUPTED is returned, the database may be in a logically inconsistent state. However, if mco_trans_rollback() is called immediately, the kernel guarantees that the rollback will complete before the transaction deadline.

Important: Delaying the rollback after receiving MCO_E_INTERRUPTED may cause the deadline to expire during rollback, resulting in an unrecoverable timing violation.

Return Codes

MCO_S_OK
Sufficient time remains to proceed; rollback is not yet required.
MCO_E_INTERRUPTED
The transaction’s forward flow time has exceeded the safe threshold for timely rollback completion.

Files

Header file:
mco.h
Source file:
mcotrans.c
Library:
libmcolib.a