This is an automated email from the ASF dual-hosted git repository.

jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git


The following commit(s) were added to refs/heads/master by this push:
     new 44a71a430 [hotfix]update upgrade.sql (#3563)
44a71a430 is described below

commit 44a71a4306ddf7298a808c7c758e92d5a695b6b0
Author: Wang Tao <[email protected]>
AuthorDate: Wed May 14 19:28:31 2025 +0800

    [hotfix]update upgrade.sql (#3563)
    
    * fix# update upgrade.sql
    
    * fix# update upgrade.sql
    
    * fix# update upgrade.sql
    
    * fix# update upgrade.sql
---
 .../{upgrade.sql => upgrade-0.7.0-to-0.8.0.sql}    |  3 --
 amoro-ams/src/main/resources/mysql/upgrade.sql     | 60 ----------------------
 2 files changed, 63 deletions(-)

diff --git a/amoro-ams/src/main/resources/mysql/upgrade.sql 
b/amoro-ams/src/main/resources/mysql/upgrade-0.7.0-to-0.8.0.sql
similarity index 96%
copy from amoro-ams/src/main/resources/mysql/upgrade.sql
copy to amoro-ams/src/main/resources/mysql/upgrade-0.7.0-to-0.8.0.sql
index 774a9b0b5..6f641bd4d 100644
--- a/amoro-ams/src/main/resources/mysql/upgrade.sql
+++ b/amoro-ams/src/main/resources/mysql/upgrade-0.7.0-to-0.8.0.sql
@@ -13,9 +13,6 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 
--- If you have any changes to the AMS database, please record them in this 
file.
--- We will confirm the corresponding version of these upgrade scripts when 
releasing.
-
 -- NEW SCHEMA CHANGE FOR CAS BASE BLOCKER
 TRUNCATE TABLE `table_blocker`;
 ALTER TABLE `table_blocker` DROP INDEX `table_index`;
diff --git a/amoro-ams/src/main/resources/mysql/upgrade.sql 
b/amoro-ams/src/main/resources/mysql/upgrade.sql
index 774a9b0b5..69f409555 100644
--- a/amoro-ams/src/main/resources/mysql/upgrade.sql
+++ b/amoro-ams/src/main/resources/mysql/upgrade.sql
@@ -15,63 +15,3 @@
 
 -- If you have any changes to the AMS database, please record them in this 
file.
 -- We will confirm the corresponding version of these upgrade scripts when 
releasing.
-
--- NEW SCHEMA CHANGE FOR CAS BASE BLOCKER
-TRUNCATE TABLE `table_blocker`;
-ALTER TABLE `table_blocker` DROP INDEX `table_index`;
-ALTER TABLE `table_blocker` ADD COLUMN `prev_blocker_id` bigint(20) NOT NULL 
DEFAULT -1 COMMENT 'prev blocker id when created';
-ALTER TABLE `table_blocker` ADD UNIQUE KEY `uq_prev` 
(`catalog_name`,`db_name`,`table_name`, `prev_blocker_id`);
-
--- ADD COLUMN table_summary FOR TABLE_RUNTIME
-ALTER TABLE `table_runtime` ADD COLUMN `table_summary` mediumtext AFTER 
`pending_input`;
-
-RENAME TABLE table_runtime TO table_runtime_backup;
-CREATE TABLE table_runtime LIKE table_runtime_backup;
-
-ALTER TABLE table_runtime CHANGE COLUMN optimizing_status 
optimizing_status_code INT DEFAULT 700;
-CREATE INDEX idx_optimizer_status_and_time ON 
table_runtime(optimizing_status_code, optimizing_status_start_time DESC);
-
-INSERT INTO table_runtime(
-    `table_id`,`catalog_name`, `db_name`, `table_name`, 
`current_snapshot_id`,`current_change_snapshotId`, `last_optimized_snapshotId`,
-    `last_optimized_change_snapshotId`, `last_major_optimizing_time`, 
`last_minor_optimizing_time`, `last_full_optimizing_time`,
-    `optimizing_status_code`, `optimizing_status_start_time`, 
`optimizing_process_id`, `optimizer_group`, `table_config`,
-    `optimizing_config`, `pending_input`, `table_summary`)
-SELECT  `table_id`,`catalog_name`, `db_name`, `table_name`, 
`current_snapshot_id`,`current_change_snapshotId`, `last_optimized_snapshotId`,
-        `last_optimized_change_snapshotId`, `last_major_optimizing_time`, 
`last_minor_optimizing_time`, `last_full_optimizing_time`,
-        CASE
-            WHEN `optimizing_status` = 'IDLE' THEN 700
-            WHEN `optimizing_status` = 'PENDING' THEN 600
-            WHEN `optimizing_status` = 'PLANNING' THEN 500
-            WHEN `optimizing_status` = 'COMMITTING' THEN 400
-            WHEN `optimizing_status` = 'MINOR_OPTIMIZING' THEN 300
-            WHEN `optimizing_status` = 'MAJOR_OPTIMIZING' THEN 200
-            WHEN `optimizing_status` = 'FULL_OPTIMIZING' THEN 100
-            END,
-        `optimizing_status_start_time`, `optimizing_process_id`, 
`optimizer_group`, `table_config`, `optimizing_config`, `pending_input`,  
`table_summary`
-FROM table_runtime_backup;
-
--- database http session handler
-CREATE TABLE `http_session` (
-    `session_id`    varchar(120) NOT NULL COMMENT 'HTTP Session ID',
-    `context_path`  varchar(60) COMMENT 'Jetty Context path',
-    `virtual_host`  varchar(60) COMMENT 'Jetty virtual host',
-    `last_node`     varchar(60) COMMENT 'Last node',
-    `access_time`   bigint(20) COMMENT 'Access time',
-    `last_access_time`  bigint(20) COMMENT 'Last access time',
-    `create_time`   bigint(20)  COMMENT 'Create time',
-    `cookie_time`   bigint(20)  COMMENT 'Cookie time',
-    `last_save_time` bigint(20) COMMENT 'Last save time',
-    `expiry_time`   bigint(20)  COMMENT 'Expiry time',
-    `max_interval`  bigint(20)  COMMENT 'Max internal',
-    `data_store`    blob        COMMENT 'Session data store',
-    PRIMARY KEY(`session_id`, `context_path`, `virtual_host`),
-    KEY `idx_session_expiry` (`expiry_time`)
-) ENGINE = InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Http session store' 
ROW_FORMAT=DYNAMIC;
-
--- update resource group memory unit
-update resource_group set properties = JSON_SET(properties, 
'$."flink-conf.jobmanager.memory.process.size"', 
CONCAT(JSON_UNQUOTE(JSON_EXTRACT(properties, 
'$."flink-conf.jobmanager.memory.process.size"')), 'MB')) WHERE 
JSON_UNQUOTE(JSON_EXTRACT(properties, 
'$."flink-conf.jobmanager.memory.process.size"')) REGEXP '^[0-9]+$';
-update resource_group set properties = JSON_SET(properties, 
'$."flink-conf.taskmanager.memory.process.size"', 
CONCAT(JSON_UNQUOTE(JSON_EXTRACT(properties, 
'$."flink-conf.taskmanager.memory.process.size"')), 'MB')) WHERE 
JSON_UNQUOTE(JSON_EXTRACT(properties, 
'$."flink-conf.taskmanager.memory.process.size"')) REGEXP '^[0-9]+$';
-
--- update resource memory unit
-update resource set properties = JSON_SET(properties, 
'$."flink-conf.jobmanager.memory.process.size"', 
CONCAT(JSON_UNQUOTE(JSON_EXTRACT(properties, 
'$."flink-conf.jobmanager.memory.process.size"')), 'MB')) WHERE 
JSON_UNQUOTE(JSON_EXTRACT(properties, 
'$."flink-conf.jobmanager.memory.process.size"')) REGEXP '^[0-9]+$';
-update resource set properties = JSON_SET(properties, 
'$."flink-conf.taskmanager.memory.process.size"', 
CONCAT(JSON_UNQUOTE(JSON_EXTRACT(properties, 
'$."flink-conf.taskmanager.memory.process.size"')), 'MB')) WHERE 
JSON_UNQUOTE(JSON_EXTRACT(properties, 
'$."flink-conf.taskmanager.memory.process.size"')) REGEXP '^[0-9]+$';

Reply via email to