!230 在openGauss 主备环境上进行 业务并发测试 GTT表产生coredump
Merge pull request !230 from wangzhijun/master
This commit is contained in:
@ -4674,6 +4674,8 @@ TransactionId ListAllSessionGttFrozenxids(int maxSize, ThreadId *pids, Transacti
|
||||
}
|
||||
|
||||
ThreadPoolSessControl *sessCtrl = g_threadPoolControler->GetSessionCtrl();
|
||||
AutoMutexLock alock(sessCtrl->GetSessionCtrlLock());
|
||||
alock.lock();
|
||||
const knl_sess_control *sessList = sessCtrl->GetSessionList();
|
||||
const knl_sess_control *currSess = sessList;
|
||||
while (currSess != nullptr) {
|
||||
@ -4694,6 +4696,7 @@ TransactionId ListAllSessionGttFrozenxids(int maxSize, ThreadId *pids, Transacti
|
||||
}
|
||||
currSess = currSess->next;
|
||||
}
|
||||
alock.unLock();
|
||||
|
||||
if (maxSize > 0) {
|
||||
*n = i;
|
||||
|
||||
@ -88,9 +88,9 @@ public:
|
||||
return m_activelist;
|
||||
}
|
||||
|
||||
inline pthread_mutex_t GetSessionCtrlLock()
|
||||
inline pthread_mutex_t* GetSessionCtrlLock()
|
||||
{
|
||||
return m_sessCtrlock;
|
||||
return &m_sessCtrlock;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user