!3649 【资源池化】共享存储模式禁止配置过大的Proc threads数量
Merge pull request !3649 from 陈婷婷/master
This commit is contained in:
@ -126,6 +126,7 @@ int ss_dms_func_init()
|
||||
SS_RETURN_IFERR(DMS_LOAD_SYMBOL_FUNC(dms_refresh_logger));
|
||||
SS_RETURN_IFERR(DMS_LOAD_SYMBOL_FUNC(dms_validate_drc));
|
||||
SS_RETURN_IFERR(DMS_LOAD_SYMBOL_FUNC(dms_reform_req_opengauss_ondemand_redo_buffer));
|
||||
SS_RETURN_IFERR(DMS_LOAD_SYMBOL_FUNC(dms_get_mes_max_watting_rooms));
|
||||
g_ss_dms_func.inited = true;
|
||||
return DMS_SUCCESS;
|
||||
}
|
||||
@ -339,3 +340,8 @@ int dms_reform_req_opengauss_ondemand_redo_buffer(dms_context_t *dms_ctx, void *
|
||||
{
|
||||
return g_ss_dms_func.dms_reform_req_opengauss_ondemand_redo_buffer(dms_ctx, block_key, key_len, redo_status);
|
||||
}
|
||||
|
||||
unsigned int dms_get_mes_max_watting_rooms(void)
|
||||
{
|
||||
return g_ss_dms_func.dms_get_mes_max_watting_rooms();
|
||||
}
|
||||
|
||||
@ -41,6 +41,7 @@
|
||||
|
||||
#define FIXED_NUM_OF_INST_IP_PORT 3
|
||||
#define BYTES_PER_KB 1024
|
||||
#define NON_PROC_NUM 4
|
||||
|
||||
|
||||
const int MAX_CPU_STR_LEN = 5;
|
||||
@ -395,6 +396,13 @@ void DMSInit()
|
||||
ereport(FATAL, (errmsg("failed to register dms memcxt callback!")));
|
||||
}
|
||||
|
||||
uint32 TotalProcs = (uint32)(GLOBAL_ALL_PROCS);
|
||||
uint32 MesMaxRooms = dms_get_mes_max_watting_rooms();
|
||||
if (TotalProcs + NON_PROC_NUM >= MesMaxRooms) {
|
||||
ereport(FATAL, (errmsg("The thread ID range is too large when dms enable. Please set the related GUC "
|
||||
"parameters to a smaller value.")));
|
||||
}
|
||||
|
||||
dms_profile_t profile;
|
||||
errno_t rc = memset_s(&profile, sizeof(dms_profile_t), 0, sizeof(dms_profile_t));
|
||||
securec_check(rc, "\0", "\0");
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
dms_commit_id=cf6200a73770c7e5a5a8d12d8d060bf32032735a
|
||||
dss_commit_id=97deeec25d7ec4ee0c92b5bc0bcc50eaa3ae64af
|
||||
dms_commit_id=ede9efeda8ed0ab2ad79f119b619c8a063023683
|
||||
dss_commit_id=97deeec25d7ec4ee0c92b5bc0bcc50eaa3ae64af
|
||||
@ -833,6 +833,7 @@ typedef struct st_dms_profile {
|
||||
unsigned char scrlock_server_bind_core_start;
|
||||
unsigned char scrlock_server_bind_core_end;
|
||||
unsigned char parallel_thread_num;
|
||||
unsigned int max_wait_time;
|
||||
} dms_profile_t;
|
||||
|
||||
typedef struct st_logger_param {
|
||||
@ -846,11 +847,16 @@ typedef struct st_logger_param {
|
||||
((ctrl)->lock_mode == DMS_LOCK_SHARE))
|
||||
#define DMS_BUF_CTRL_NOT_LOCK(ctrl) ((ctrl)->lock_mode == DMS_LOCK_NULL)
|
||||
|
||||
typedef enum en_dms_info_id {
|
||||
DMS_INFO_REFORM_CURRENT = 0,
|
||||
DMS_INFO_REFORM_LAST = 1,
|
||||
} dms_info_id_e;
|
||||
|
||||
#define DMS_LOCAL_MAJOR_VER_WEIGHT 1000000
|
||||
#define DMS_LOCAL_MINOR_VER_WEIGHT 1000
|
||||
#define DMS_LOCAL_MAJOR_VERSION 0
|
||||
#define DMS_LOCAL_MINOR_VERSION 0
|
||||
#define DMS_LOCAL_VERSION 73
|
||||
#define DMS_LOCAL_VERSION 76
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@ -81,6 +81,7 @@ typedef struct st_ss_dms_func {
|
||||
unsigned char is_dirty);
|
||||
int (*dms_reform_req_opengauss_ondemand_redo_buffer)(dms_context_t *dms_ctx, void *block_key, unsigned int key_len,
|
||||
int *redo_status);
|
||||
unsigned int (*dms_get_mes_max_watting_rooms)(void);
|
||||
} ss_dms_func_t;
|
||||
|
||||
int ss_dms_func_init();
|
||||
@ -125,6 +126,7 @@ void dms_pre_uninit(void);
|
||||
void dms_validate_drc(dms_context_t *dms_ctx, dms_buf_ctrl_t *ctrl, unsigned long long lsn, unsigned char is_dirty);
|
||||
int dms_reform_req_opengauss_ondemand_redo_buffer(dms_context_t *dms_ctx, void *block_key, unsigned int key_len,
|
||||
int *redo_status);
|
||||
unsigned int dms_get_mes_max_watting_rooms(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user