From 01e1ddaf84e01dbedfa3f4aff9f82e94dfbeaa98 Mon Sep 17 00:00:00 2001 From: obdev Date: Fri, 9 Feb 2024 06:14:06 +0000 Subject: [PATCH] Placeholder for DATA_DISK_SIZE --- src/objit/include/objit/common/ob_item_type.h | 2 ++ .../ob_inner_table_schema.101_150.cpp | 19 +++++++++++++++++++ .../inner_table/ob_inner_table_schema_def.py | 1 + 3 files changed, 22 insertions(+) diff --git a/src/objit/include/objit/common/ob_item_type.h b/src/objit/include/objit/common/ob_item_type.h index 2c994574f1..b6808ed600 100755 --- a/src/objit/include/objit/common/ob_item_type.h +++ b/src/objit/include/objit/common/ob_item_type.h @@ -2392,6 +2392,8 @@ typedef enum ObItemType T_CANCEL_TRANSFER_PARTITION, T_CANCEL_BALANCE_JOB, T_AUTO_SPLIT_TABLET_SIZE, + + T_DATA_DISK_SIZE, T_MAX //Attention: add a new type before T_MAX } ObItemType; diff --git a/src/share/inner_table/ob_inner_table_schema.101_150.cpp b/src/share/inner_table/ob_inner_table_schema.101_150.cpp index 7d313926e5..3247d62d84 100644 --- a/src/share/inner_table/ob_inner_table_schema.101_150.cpp +++ b/src/share/inner_table/ob_inner_table_schema.101_150.cpp @@ -9375,6 +9375,25 @@ int ObInnerTableSchema::all_unit_config_schema(ObTableSchema &table_schema) false, //is_nullable false); //is_autoincrement } + + if (OB_SUCC(ret)) { + ObObj data_disk_size_default; + data_disk_size_default.set_int(-1); + ADD_COLUMN_SCHEMA_T("data_disk_size", //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 + data_disk_size_default, + data_disk_size_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 bcf3f8f1ba..97bbd5e6dd 100644 --- a/src/share/inner_table/ob_inner_table_schema_def.py +++ b/src/share/inner_table/ob_inner_table_schema_def.py @@ -810,6 +810,7 @@ def_table_schema( ('max_iops', 'int'), ('min_iops', 'int'), ('iops_weight', 'int'), + ('data_disk_size', 'int', 'false', '-1'), ], )