Bug #725
tmqueue might deadlock when performing tpenqueue() or tpdequeue() in global transaction
Status: | Closed | Start date: | 09/01/2021 | |
---|---|---|---|---|
Priority: | Normal (Code 4) | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | - | |||
Target version: | - |
Description
When running tpenqueue() or tpdequeue() in global transaction with having large number of concurrent processes which are calling the queue space, the tmqueue might lock against initial tmsrv, due to fact that the main thread of tmqueue is asking tmsrv to enlist the transaction, while the tmsrv might have all busy slots with asking particular tmqueue for finalizing the transaction.
The solution would be make to defer tmqueue global transaction join, after call have moved to service thread pool. Thus notify pool will be able to complete the tmsrv calls.
History
#1 Updated by Madars about 2 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
#2 Updated by Lauris about 2 years ago
Release notes¶
tmqueue binary has been updated, so that global transaction related registration tasks are moved to thread-pool instead of main thread. With this, in-flows now are separated i.e. tmsrv queue completion messages goes to one thread-pool (does not require global registration) and tpenqueue()/tpdequeue() global transaction requests are processed by other thread-pool. This approach solves the possibility of the deadlock.
Available from Enduro/X release 7.5.32+.
#3 Updated by Lauris about 2 years ago
- Status changed from Resolved to Closed