merge cherry-pick-mr-7993-1751013740826-auto into 6.0.0
加固GSCMemThresholdCheck Created-by: chenxiaobin19 Commit-by: chenxiaobin19 Merged-by: opengauss_bot Description: 【标题】(请简要描述下实现的内容) 加固GSCMemThresholdCheck 【实现内容】: 见:https://gitcode.com/opengauss/openGauss-server/pull/7993 【根因分析】: 【实现方案】: 【关联需求或issue】: https://gitcode.com/opengauss/openGauss-server/issues/7226 【开发自验报告】: 1. 请附上自验结果(内容或者截图) 2. 是否可以添加fastcheck测试用例,如是,请补充fastcheck用例 3. 是否涉及资料修改,如是,在docs仓库补充资料 4. 是否考虑升级场景(系统表修改、日志持久化以及修改执行态数据格式) 5. 是否考虑在线扩容等扩展场景 6. 是否考虑异常场景/并发场景/前向兼容/性能场景 7. 是否对其他模块产生影响 【其他说明】: See merge request: opengauss/openGauss-server!7996
This commit is contained in:
@ -416,6 +416,10 @@ void GlobalSysDBCache::GSCMemThresholdCheck()
|
||||
return;
|
||||
}
|
||||
|
||||
if (unlikely(t_thrd.utils_cxt.CurrentResourceOwner == NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* only one clean is enough */
|
||||
ResourceOwnerEnlargeGlobalIsExclusive(LOCAL_SYSDB_RESOWNER);
|
||||
if (!atomic_compare_exchange_u32(&m_is_memorychecking, 0, 1)) {
|
||||
|
||||
Reference in New Issue
Block a user