Feature #714

tmqueue internal transaction accouting

Added by Madars about 1 year ago. Updated about 1 year ago.

Status:ClosedStart date:07/21/2021
Priority:Normal (Code 4)Due date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

To provide better system response at extreme system conditions (storage failures, shutdowns at high loads, race conditions on tpenqueue() / tpdequeue()) the tmqueue, shall be updated:

- Tmqueue shall account all XA transactions internally, regardless of associated tmsrv.
- Tmqueue shall provide global session timeout setting to rollback any active (not prepared, not committed) transaction if transaction is not completed in time.
- In case of tmsrv transaction prepare, if transaction is unknown for tmqueue, XAER_NOTA error shall be returned and global transactions is aborted.
- At tmqueue startup any active transaction must be rolled back.
- Just allow single tmqueue process per queue space (doc update).
- Just allow single directory be shared per queue space (doc update).

History

#1 Updated by Madars about 1 year ago

Release notes

tmqueue have been improved with above requirements. Configuration upgrade shall be performed when installing new Enduro/X version, see bellow. Added new configuration flag for tmqueue process -T which indicates the in-active transaction session timeout, for which default value is set to 180 seconds. If expecting that queue transaction can belong to active transaction for longer time period, where tpenqueue() or tpdequeue() is not called in the middle (as these calls reset the transaction activity counter), increase the setting correspondingly, otherwise such transactions would be rolled back at commit point. See tmqueue(8) and libndrxxaqdisks(8) manpages for details.

NOTE: With this release it is mandatory that only 1*x tmqueue process (min/max=1) is used per queue space. Secondly the *datadir must not be shared between different tmqueue / queue space instances.

Configuration changes:

1. ini queue open string shall be parameterized with queue space name, i.e. existing config:

[@global/RM1TMQ]
NDRX_XA_RES_ID=1
NDRX_XA_OPEN_STR=${NDRX_APPHOME}/qdata
NDRX_XA_CLOSE_STR=${NDRX_XA_OPEN_STR}
NDRX_XA_DRIVERLIB=libndrxxaqdisks.so
NDRX_XA_RMLIB=libndrxxaqdisk.so
NDRX_XA_LAZY_INIT=0

must be upgraded to:

[@global/RM1TMQ]
NDRX_XA_RES_ID=1
NDRX_XA_OPEN_STR=datadir="${NDRX_APPHOME}/qdata",qspace="SAMPLESPACE" 
NDRX_XA_CLOSE_STR=${NDRX_XA_OPEN_STR}
NDRX_XA_DRIVERLIB=libndrxxaqdisks.so
NDRX_XA_RMLIB=libndrxxaqdisk.so
NDRX_XA_LAZY_INIT=0

2. XML config (ndrxconfig.xml) tmqueue parameter -m <QSPACE_NAME> shall be removed, i.e.

previous config:

                <server name="tmqueue">
...
                        <cctag>RM1TMQ</cctag>
                        <sysopt>-e ${NDRX_APPHOME}/log/tmq.log -r -- -s30 -f5 -mSAMPLESPACE </sysopt>
                </server>

must be changed to:

                <server name="tmqueue">
...
                        <cctag>RM1TMQ</cctag>
                        <sysopt>-e ${NDRX_APPHOME}/log/tmq.log -r -- -s30 -f5</sysopt>
                </server>

If config updates is not applied, tmqueue and associated tmsrv processes will not start.

#2 Updated by Madars about 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#3 Updated by Madars about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF