forked from huawei/openGauss-server
Global SysCache
Offering: openGaussDev More detail: 修复线程池模式waitmission起事务后内存上下文不正确导致内存泄漏问题 Match-id-18f61b45531eaa886b7b7cf2bce9bf6c97a901fb
This commit is contained in:
parent
38b7213f8e
commit
6dc2d139d5
|
|
@ -185,6 +185,8 @@ void ThreadPoolWorker::WaitMission()
|
|||
* before we serve next session we must keep us clean.
|
||||
*/
|
||||
PreventSignal();
|
||||
|
||||
MemoryContext old = CurrentMemoryContext;
|
||||
while (true) {
|
||||
/* we should keep the thread clean for next Session. */
|
||||
CleanThread();
|
||||
|
|
@ -222,7 +224,7 @@ void ThreadPoolWorker::WaitMission()
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MemoryContextSwitchTo(old);
|
||||
(void)disable_session_sig_alarm();
|
||||
/* now we can accept signal. out of this, we rely on signal handle. */
|
||||
AllowSignal();
|
||||
|
|
|
|||
Loading…
Reference in New Issue