mirror of https://github.com/Icinga/icinga2.git
IDO-MySQL: Make sure InternalNewTransaction() and FinishAsyncQueries() get executed during high load
This commit is contained in:
parent
15786baf3d
commit
f551e95338
|
@ -160,8 +160,7 @@ void IdoMysqlConnection::NewTransaction()
|
||||||
<< "Scheduling new transaction and finishing async queries.";
|
<< "Scheduling new transaction and finishing async queries.";
|
||||||
#endif /* I2_DEBUG */
|
#endif /* I2_DEBUG */
|
||||||
|
|
||||||
m_QueryQueue.Enqueue([this]() { InternalNewTransaction(); }, PriorityNormal);
|
m_QueryQueue.Enqueue([this]() { InternalNewTransaction(); }, PriorityHigh);
|
||||||
m_QueryQueue.Enqueue([this]() { FinishAsyncQueries(); }, PriorityNormal);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IdoMysqlConnection::InternalNewTransaction()
|
void IdoMysqlConnection::InternalNewTransaction()
|
||||||
|
@ -175,6 +174,8 @@ void IdoMysqlConnection::InternalNewTransaction()
|
||||||
|
|
||||||
AsyncQuery("COMMIT");
|
AsyncQuery("COMMIT");
|
||||||
AsyncQuery("BEGIN");
|
AsyncQuery("BEGIN");
|
||||||
|
|
||||||
|
FinishAsyncQueries();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IdoMysqlConnection::ReconnectTimerHandler()
|
void IdoMysqlConnection::ReconnectTimerHandler()
|
||||||
|
|
Loading…
Reference in New Issue