You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/12/16 07:25:28 UTC
[GitHub] [dolphinscheduler] zhongjiajie commented on a diff in pull request #13194: [Feature][Master] Add task caching mechanism to improve the running speed of repetitive tasks
zhongjiajie commented on code in PR #13194:
URL: https://github.com/apache/dolphinscheduler/pull/13194#discussion_r1050437946
##########
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql:
##########
@@ -894,7 +898,8 @@ CREATE TABLE `t_ds_task_instance` (
`test_flag` tinyint(4) DEFAULT null COMMENT 'test flagļ¼0 normal, 1 test run',
PRIMARY KEY (`id`),
KEY `process_instance_id` (`process_instance_id`) USING BTREE,
- KEY `idx_code_version` (`task_code`, `task_definition_version`) USING BTREE
+ KEY `idx_code_version` (`task_code`, `task_definition_version`) USING BTREE,
+ KEY `cache_key` (`cache_key`) USING BTREE
Review Comment:
```suggestion
KEY `idx_cache_key` (`cache_key`) USING BTREE
```
##########
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql:
##########
@@ -796,6 +800,7 @@ CREATE TABLE t_ds_task_instance (
) ;
create index idx_task_instance_code_version on t_ds_task_instance (task_code, task_definition_version);
+create index cache_key on t_ds_task_instance (cache_key);
Review Comment:
```suggestion
create index idx_cache_key on t_ds_task_instance (cache_key);
```
##########
dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/postgresql/dolphinscheduler_ddl.sql:
##########
@@ -119,3 +119,14 @@ d//
delimiter ;
select uc_dolphin_T_t_ds_task_instance_R_test_flag();
DROP FUNCTION uc_dolphin_T_t_ds_task_instance_R_test_flag();
+
+ALTER TABLE t_ds_task_definition DROP COLUMN IF EXISTS is_cache;
Review Comment:
can we make L123 and L128 together to make more sense, to told user we want to recreate the column.
```sql
ALTER TABLE t_ds_task_definition DROP COLUMN IF EXISTS is_cache;
ALTER TABLE t_ds_task_definition ADD COLUMN IF NOT EXISTS is_cache int DEFAULT '0';
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org