add openGauss 3.1.0 feature code

This commit is contained in:
yanghao
2022-09-03 16:22:35 +08:00
parent 801d945a3d
commit b919f404e8
2759 changed files with 521358 additions and 366321 deletions

View File

@ -116,7 +116,12 @@ public:
{
return m_streamProcRatio;
}
inline int GetThreadActualNum()
{
return m_threadNum;
}
void BindThreadToAllAvailCpu(ThreadId thread) const;
void EnableAdjustPool();
static int ParseRangeStr(char* attr, bool* arr, int totalNum, char* bindtype);

View File

@ -67,16 +67,6 @@ public:
m_tid = 0;
}
#ifdef ENABLE_LITE_MODE
inline bool IsBusy()
{
if (m_group->m_waitServeSessionCount == 0 && m_group->m_processTaskCount > 2) {
return false;
} else {
return true;
}
}
#endif
private:
void HandleConnEvent(int nevets);
knl_session_context* GetSessionBaseOnEvent(struct epoll_event* ev);
@ -101,8 +91,10 @@ private:
int m_session_nbucket;
Dllist *m_session_bucket; // add rwlock
pthread_rwlock_t *m_session_rw_locks;
uint32 m_match_search;
volatile uint32 m_match_search;
volatile uint32 m_uninit_count;
const uint32 MATCH_SEARCH_THRESHOLD = 10;
const uint32 UNINIT_SESS_THRESHOLD = 10;
};
#endif /* THREAD_POOL_LISTENER_H */

View File

@ -66,7 +66,10 @@ public:
void CheckPermissionForSendSignal(knl_session_context* sess, sig_atomic_t* lock);
void getSessionMemoryDetail(Tuplestorestate* tupStore, TupleDesc tupDesc, knl_sess_control** sess);
void getSessionClientInfo(Tuplestorestate* tupStore, TupleDesc tupDesc);
void getSessionMemoryContextInfo(const char* ctx_name, StringInfoData* buf, knl_sess_control** sess);
void getSessionMemoryContextInfo(const char* ctx_name, StringInfoDataHuge* buf, knl_sess_control** sess);
void getSessionMemoryContextSpace(StringInfoDataHuge* buf, knl_sess_control** sess);
bool CheckSessionCanTerminate(const Oid roleId);
SessMemoryUsage* getSessionMemoryUsage(int* num);
knl_session_context* GetSessionByIdx(int idx);
int FindCtrlIdxBySessId(uint64 id);
TransactionId ListAllSessionGttFrozenxids(int maxSize, ThreadId *pids, TransactionId *xids, int *n);