Fix backend DCB writeq throttling
The callbacks iterated over all threads when only the local ones must be iterated. This prevents a deadlock from occurring when multiple threads start throttling at the same time. Also fixed the gwbuf_append debug assertion.
This commit is contained in:
@ -450,6 +450,9 @@ int gwbuf_compare(const GWBUF* lhs, const GWBUF* rhs)
|
||||
|
||||
GWBUF* gwbuf_append(GWBUF* head, GWBUF* tail)
|
||||
{
|
||||
mxb_assert(!head || head->owner == RoutingWorker::get_current_id());
|
||||
mxb_assert(!tail || tail->owner == RoutingWorker::get_current_id());
|
||||
|
||||
if (!head)
|
||||
{
|
||||
return tail;
|
||||
@ -459,8 +462,6 @@ GWBUF* gwbuf_append(GWBUF* head, GWBUF* tail)
|
||||
return head;
|
||||
}
|
||||
|
||||
mxb_assert(head->owner == RoutingWorker::get_current_id()
|
||||
&& tail->owner == RoutingWorker::get_current_id());
|
||||
head->tail->next = tail;
|
||||
head->tail = tail->tail;
|
||||
|
||||
|
Reference in New Issue
Block a user