diff --git a/src/pl/sys_package/ob_pl_dbms_resource_manager.cpp b/src/pl/sys_package/ob_pl_dbms_resource_manager.cpp index cac818fdf..23af58b79 100644 --- a/src/pl/sys_package/ob_pl_dbms_resource_manager.cpp +++ b/src/pl/sys_package/ob_pl_dbms_resource_manager.cpp @@ -191,6 +191,8 @@ int ObPlDBMSResourceManager::create_plan_directive( MIN_IOPS = 5, MAX_IOPS = 6, WEIGHT_IOPS = 7, + MAX_NET_BADNWIDTH = 8, // placeholder + NET_BANDWIDTH_WEIGHT = 9, // placeholder MAX_PARAM }; @@ -287,6 +289,8 @@ int ObPlDBMSResourceManager::update_plan_directive( MIN_IOPS = 5, MAX_IOPS = 6, WEIGHT_IOPS = 7, + MAX_NET_BADNWIDTH = 8, // placeholder + NET_BANDWIDTH_WEIGHT = 9, // placeholder MAX_PARAM }; int ret = OB_SUCCESS; diff --git a/src/share/inner_table/ob_inner_table_schema.15151_15200.cpp b/src/share/inner_table/ob_inner_table_schema.15151_15200.cpp index be4ec7199..c1e6e6cf4 100644 --- a/src/share/inner_table/ob_inner_table_schema.15151_15200.cpp +++ b/src/share/inner_table/ob_inner_table_schema.15151_15200.cpp @@ -5244,6 +5244,36 @@ int ObInnerTableSchema::all_virtual_res_mgr_directive_real_agent_ora_schema(ObTa false); //is_autoincrement } + if (OB_SUCC(ret)) { + ADD_COLUMN_SCHEMA("MAX_NET_BANDWIDTH", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObNumberType, //column_type + CS_TYPE_INVALID, //column_collation_type + 38, //column_length + 38, //column_precision + 0, //column_scale + false, //is_nullable + false); //is_autoincrement + } + + if (OB_SUCC(ret)) { + ADD_COLUMN_SCHEMA("NET_BANDWIDTH_WEIGHT", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObNumberType, //column_type + CS_TYPE_INVALID, //column_collation_type + 38, //column_length + 38, //column_precision + 0, //column_scale + false, //is_nullable + false); //is_autoincrement + } + if (OB_SUCC(ret)) { ADD_COLUMN_SCHEMA("GMT_CREATE", //column_name ++column_id, //column_id diff --git a/src/share/inner_table/ob_inner_table_schema.301_350.cpp b/src/share/inner_table/ob_inner_table_schema.301_350.cpp index a7692570e..87fc9ea0f 100644 --- a/src/share/inner_table/ob_inner_table_schema.301_350.cpp +++ b/src/share/inner_table/ob_inner_table_schema.301_350.cpp @@ -396,6 +396,44 @@ int ObInnerTableSchema::all_res_mgr_directive_schema(ObTableSchema &table_schema weight_iops_default, weight_iops_default); //default_value } + + if (OB_SUCC(ret)) { + ObObj max_net_bandwidth_default; + max_net_bandwidth_default.set_int(100); + ADD_COLUMN_SCHEMA_T("max_net_bandwidth", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObIntType, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(int64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false, //is_autoincrement + max_net_bandwidth_default, + max_net_bandwidth_default); //default_value + } + + if (OB_SUCC(ret)) { + ObObj net_bandwidth_weight_default; + net_bandwidth_weight_default.set_int(0); + ADD_COLUMN_SCHEMA_T("net_bandwidth_weight", //column_name + ++column_id, //column_id + 0, //rowkey_id + 0, //index_id + 0, //part_key_pos + ObIntType, //column_type + CS_TYPE_INVALID, //column_collation_type + sizeof(int64_t), //column_length + -1, //column_precision + -1, //column_scale + false, //is_nullable + false, //is_autoincrement + net_bandwidth_weight_default, + net_bandwidth_weight_default); //default_value + } table_schema.set_index_using_type(USING_BTREE); table_schema.set_row_store_type(ENCODING_ROW_STORE); table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL); diff --git a/src/share/inner_table/ob_inner_table_schema_def.py b/src/share/inner_table/ob_inner_table_schema_def.py index c2c8399a3..f10479a92 100644 --- a/src/share/inner_table/ob_inner_table_schema_def.py +++ b/src/share/inner_table/ob_inner_table_schema_def.py @@ -2795,7 +2795,9 @@ def_table_schema( ('utilization_limit', 'int', 'false', 100), ('min_iops', 'int', 'false', 0), ('max_iops', 'int', 'false', 100), - ('weight_iops', 'int', 'false', 0) + ('weight_iops', 'int', 'false', 0), + ('max_net_bandwidth', 'int', 'false', 100), + ('net_bandwidth_weight', 'int', 'false', 0) ], ) diff --git a/src/share/resource_manager/ob_resource_plan_info.cpp b/src/share/resource_manager/ob_resource_plan_info.cpp index 9c6351c77..dddfc558d 100644 --- a/src/share/resource_manager/ob_resource_plan_info.cpp +++ b/src/share/resource_manager/ob_resource_plan_info.cpp @@ -48,6 +48,15 @@ ObString oceanbase::share::get_io_function_name(ObFunctionType function_type) case ObFunctionType::PRIO_OTHER_BACKGROUND: ret_name = ObString("OTHER_BACKGROUND"); break; + case ObFunctionType::PRIO_CLOG_LOW: + ret_name = ObString("CLOG_LOW"); + break; + case ObFunctionType::PRIO_CLOG_MID: + ret_name = ObString("CLOG_MID"); + break; + case ObFunctionType::PRIO_CLOG_HIGH: + ret_name = ObString("CLOG_HIGH"); + break; default: ret_name = ObString("OTHER_GROUPS"); break; diff --git a/src/share/resource_manager/ob_resource_plan_info.h b/src/share/resource_manager/ob_resource_plan_info.h index 25c163a22..b0e6eec99 100644 --- a/src/share/resource_manager/ob_resource_plan_info.h +++ b/src/share/resource_manager/ob_resource_plan_info.h @@ -37,6 +37,9 @@ enum ObFunctionType PRIO_DDL = 6, PRIO_DDL_HIGH = 7, PRIO_OTHER_BACKGROUND = 8, + PRIO_CLOG_LOW = 9, //placeholder + PRIO_CLOG_MID = 10, // placeholder + PRIO_CLOG_HIGH = 11, // placeholder MAX_FUNCTION_NUM };