inner table add column and constant placeholder

This commit is contained in:
Minionyh 2024-03-12 03:37:59 +00:00 committed by ob-robot
parent 1668afef50
commit 4af9637abb
6 changed files with 87 additions and 1 deletions

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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)
],
)

View File

@ -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;

View File

@ -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
};