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 2021/08/03 13:14:20 UTC

[GitHub] [dolphinscheduler] JinyLeeChina commented on a change in pull request #5942: [Fix-5875][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

JinyLeeChina commented on a change in pull request #5942:
URL: https://github.com/apache/dolphinscheduler/pull/5942#discussion_r681745950



##########
File path: sql/dolphinscheduler_mysql.sql
##########
@@ -471,7 +471,7 @@ CREATE TABLE `t_ds_task_definition` (
   `create_time` datetime NOT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`,`code`),
-  UNIQUE KEY `task_unique` (`name`,`project_code`) USING BTREE
+  UNIQUE KEY `task_unique` (`code`,`project_code`) USING BTREE

Review comment:
       Thanks for your contribution. It can't be modified here. When the master module generates a DAG, it will use the name of the task as the key of the nodeMap (See MasterExecThread|buildFlowDag). Using code as the unique key will lead to the loss of the task. I'm refactoring this part. Please pay attention to json_split_two branch.




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