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/07/22 03:09:56 UTC

[GitHub] [dolphinscheduler] calvinjiang opened a new issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

calvinjiang opened a new issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875


   **Describe the bug**
   When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.
   
   **To Reproduce**
   Steps to reproduce the behavior, for example:
   1. Create a workflow named flow1, and then create a shell task that's called task1 in the flow1.
   2. Save the flow1.
   3. Create another workflow named flow2, and then create a shell task that's called task1 in the flow2.
   4.Save the flow2, at this point the web ui will popup an error notice saying "更新工作流定义错误"
   
   **Expected behavior**
   I'd like to use the task's name which is used as another task's name in other flows.
   
   **Screenshots**
   ![image](https://user-images.githubusercontent.com/4928204/126583867-afdc2427-805c-44b1-ad3c-922fe9869905.png)
   
   ![image](https://user-images.githubusercontent.com/4928204/126583954-5d8cc1c4-545c-4cec-98e5-8a4aa2fa2d47.png)
   
   In the dolphinscheduler-api.log:
   
   ![image](https://user-images.githubusercontent.com/4928204/126584038-e44f1601-7e9c-4c34-84c2-40c2b564b435.png)
   
   **Which version of Dolphin Scheduler:**
    -[dev]
   
   **Additional context**
   Exception stack trace:
   
   ```
   [ERROR] 2021-07-22 10:38:48.251 org.apache.dolphinscheduler.api.exceptions.ApiExceptionHandler:[46] - 更新工作流定义错误
   org.springframework.dao.DuplicateKeyException:
   ### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "task_definition_unique"
     详细:Key (name, project_code)=(ParamsTestForShellTask, 474452467712) already exists.
   ### The error may exist in org/apache/dolphinscheduler/dao/mapper/TaskDefinitionMapper.java (best guess)
   ### The error may involve org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper.insert-Inline
   ### The error occurred while setting parameters
   ### SQL: INSERT INTO t_ds_task_definition  ( fail_retry_times, timeout_notify_strategy, flag, code, task_priority, description, update_time, task_params, user_id, version, timeout, task_type, timeout_flag, create_time, project_code, fail_retry_interval, name, delay_time, worker_group, resource_ids )  VALUES  ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
   ### Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "task_definition_unique"
     详细:Key (name, project_code)=(ParamsTestForShellTask, 474452467712) already exists.
   ; ERROR: duplicate key value violates unique constraint "task_definition_unique"
     详细:Key (name, project_code)=(ParamsTestForShellTask, 474452467712) already exists.; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "task_definition_unique"
     详细:Key (name, project_code)=(ParamsTestForShellTask, 474452467712) already exists.
   	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:247)
   	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
   	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)
   	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)
   	at com.sun.proxy.$Proxy101.insert(Unknown Source)
   	at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:271)
   	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:58)
   	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)
   	at com.sun.proxy.$Proxy122.insert(Unknown Source)
   	at org.apache.dolphinscheduler.service.process.ProcessService.saveTaskDefinition(ProcessService.java:2364)
   	at org.apache.dolphinscheduler.service.process.ProcessService.handleTaskDefinition(ProcessService.java:2277)
   	at org.apache.dolphinscheduler.service.process.ProcessService.saveProcessDefinition(ProcessService.java:2212)
   	at org.apache.dolphinscheduler.service.process.ProcessService$$FastClassBySpringCGLIB$$ed138739.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687)
   	at org.apache.dolphinscheduler.service.process.ProcessService$$EnhancerBySpringCGLIB$$d02bc54d.saveProcessDefinition(<generated>)
   	at org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl.updateProcessDefinition(ProcessDefinitionServiceImpl.java:418)
   	at org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl$$FastClassBySpringCGLIB$$e8e34ed9.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687)
   	at org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl$$EnhancerBySpringCGLIB$$4564e02d.updateProcessDefinition(<generated>)
   	at org.apache.dolphinscheduler.api.controller.ProcessDefinitionController.updateProcessDefinition(ProcessDefinitionController.java:242)
   	at org.apache.dolphinscheduler.api.controller.ProcessDefinitionController$$FastClassBySpringCGLIB$$dc9bf5db.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
   	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:752)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
   	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
   	at org.apache.dolphinscheduler.api.aspect.AccessLogAspect.doAround(AccessLogAspect.java:86)
   	at sun.reflect.GeneratedMethodAccessor159.invoke(Unknown Source)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
   	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
   	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
   	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
   	at org.apache.dolphinscheduler.api.controller.ProcessDefinitionController$$EnhancerBySpringCGLIB$$22f5b91d.updateProcessDefinition(<generated>)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
   	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
   	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
   	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
   	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
   	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
   	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
   	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
   	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
   	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
   	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
   	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
   	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
   	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
   	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1633)
   	at com.github.xiaoymin.swaggerbootstrapui.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:84)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at com.github.xiaoymin.swaggerbootstrapui.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:97)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:94)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:561)
   	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
   	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
   	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
   	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1612)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
   	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
   	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
   	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
   	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
   	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
   	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
   	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
   	at org.eclipse.jetty.server.Server.handle(Server.java:516)
   	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
   	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
   	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
   	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
   	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
   	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
   	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
   	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
   	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
   	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "task_definition_unique"
     详细:Key (name, project_code)=(ParamsTestForShellTask, 474452467712) already exists.
   	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
   	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
   	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
   	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
   	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
   	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143)
   	at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:132)
   	at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)
   	at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
   	at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
   	at sun.reflect.GeneratedMethodAccessor431.invoke(Unknown Source)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
   	at com.sun.proxy.$Proxy177.update(Unknown Source)
   	at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:54)
   	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
   	at sun.reflect.GeneratedMethodAccessor485.invoke(Unknown Source)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)
   	... 112 common frames omitted
   ```
   
   **Requirement or improvement**
   - I think that using multiple tasks that have the same name in different workflows should be more useful and convenient.So I expect that this bug can be fixed ASAP.
   


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



[GitHub] [dolphinscheduler] CalvinKirs commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-891843625


   > 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.
   
   please look context.


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



[GitHub] [dolphinscheduler] JinyLeeChina commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
JinyLeeChina commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-891853505


   Please attention the class of DagHelper. I think here should replace name with code of TaskDefinition, before updating the t_ds_task_definition unique key.


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



[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-884627990


   **Describe the bug**
   When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.
   
   **To Reproduce**
   Steps to reproduce the behavior, for example:
   1. Create a workflow named flow1, and then create a shell task that's called task1 in the flow1.
   2. Save the flow1.
   3. Create another workflow named flow2, and then create a shell task that's called task1 in the flow2.
   4.Save the flow2, at this point the web ui will popup an error notice saying "更新工作流定义错误"
   
   **Expected behavior**
   I'd like to use the task's name which is used as another task's name in other flows.
   
   **Screenshots**
   ![image](https://user-images.githubusercontent.com/4928204/126583867-afdc2427-805c-44b1-ad3c-922fe9869905.png)
   
   ![image](https://user-images.githubusercontent.com/4928204/126583954-5d8cc1c4-545c-4cec-98e5-8a4aa2fa2d47.png)
   
   In the dolphinscheduler-api.log:
   
   ![image](https://user-images.githubusercontent.com/4928204/126584038-e44f1601-7e9c-4c34-84c2-40c2b564b435.png)
   
   **Which version of Dolphin Scheduler:**
    -[dev]
   
   **Additional context**
   Exception stack trace:
   
   ```
   [ERROR] 2021-07-22 10:38:48.251 org.apache.dolphinscheduler.api.exceptions.ApiExceptionHandler:[46] - 更新工作流定义错误
   org.springframework.dao.DuplicateKeyException:
   ### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "task_definition_unique"
     详细:Key (name, project_code)=(ParamsTestForShellTask, 474452467712) already exists.
   ### The error may exist in org/apache/dolphinscheduler/dao/mapper/TaskDefinitionMapper.java (best guess)
   ### The error may involve org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper.insert-Inline
   ### The error occurred while setting parameters
   ### SQL: INSERT INTO t_ds_task_definition  ( fail_retry_times, timeout_notify_strategy, flag, code, task_priority, description, update_time, task_params, user_id, version, timeout, task_type, timeout_flag, create_time, project_code, fail_retry_interval, name, delay_time, worker_group, resource_ids )  VALUES  ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
   ### Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "task_definition_unique"
     详细:Key (name, project_code)=(ParamsTestForShellTask, 474452467712) already exists.
   ; ERROR: duplicate key value violates unique constraint "task_definition_unique"
     详细:Key (name, project_code)=(ParamsTestForShellTask, 474452467712) already exists.; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "task_definition_unique"
     详细:Key (name, project_code)=(ParamsTestForShellTask, 474452467712) already exists.
   	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:247)
   	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
   	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)
   	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)
   	at com.sun.proxy.$Proxy101.insert(Unknown Source)
   	at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:271)
   	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:58)
   	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)
   	at com.sun.proxy.$Proxy122.insert(Unknown Source)
   	at org.apache.dolphinscheduler.service.process.ProcessService.saveTaskDefinition(ProcessService.java:2364)
   	at org.apache.dolphinscheduler.service.process.ProcessService.handleTaskDefinition(ProcessService.java:2277)
   	at org.apache.dolphinscheduler.service.process.ProcessService.saveProcessDefinition(ProcessService.java:2212)
   	at org.apache.dolphinscheduler.service.process.ProcessService$$FastClassBySpringCGLIB$$ed138739.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687)
   	at org.apache.dolphinscheduler.service.process.ProcessService$$EnhancerBySpringCGLIB$$d02bc54d.saveProcessDefinition(<generated>)
   	at org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl.updateProcessDefinition(ProcessDefinitionServiceImpl.java:418)
   	at org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl$$FastClassBySpringCGLIB$$e8e34ed9.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687)
   	at org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl$$EnhancerBySpringCGLIB$$4564e02d.updateProcessDefinition(<generated>)
   	at org.apache.dolphinscheduler.api.controller.ProcessDefinitionController.updateProcessDefinition(ProcessDefinitionController.java:242)
   	at org.apache.dolphinscheduler.api.controller.ProcessDefinitionController$$FastClassBySpringCGLIB$$dc9bf5db.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
   	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:752)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
   	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
   	at org.apache.dolphinscheduler.api.aspect.AccessLogAspect.doAround(AccessLogAspect.java:86)
   	at sun.reflect.GeneratedMethodAccessor159.invoke(Unknown Source)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
   	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
   	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
   	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
   	at org.apache.dolphinscheduler.api.controller.ProcessDefinitionController$$EnhancerBySpringCGLIB$$22f5b91d.updateProcessDefinition(<generated>)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
   	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
   	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
   	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
   	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
   	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
   	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
   	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
   	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
   	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
   	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
   	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
   	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
   	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
   	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1633)
   	at com.github.xiaoymin.swaggerbootstrapui.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:84)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at com.github.xiaoymin.swaggerbootstrapui.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:97)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:94)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
   	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:561)
   	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
   	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
   	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
   	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1612)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
   	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
   	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
   	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
   	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
   	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
   	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
   	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
   	at org.eclipse.jetty.server.Server.handle(Server.java:516)
   	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
   	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
   	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
   	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
   	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
   	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
   	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
   	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
   	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
   	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "task_definition_unique"
     详细:Key (name, project_code)=(ParamsTestForShellTask, 474452467712) already exists.
   	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
   	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
   	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
   	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
   	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
   	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143)
   	at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:132)
   	at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)
   	at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
   	at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
   	at sun.reflect.GeneratedMethodAccessor431.invoke(Unknown Source)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
   	at com.sun.proxy.$Proxy177.update(Unknown Source)
   	at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:54)
   	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
   	at sun.reflect.GeneratedMethodAccessor485.invoke(Unknown Source)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)
   	... 112 common frames omitted
   ```
   
   **Requirement or improvement**
   - I think that using multiple tasks that have the same name in different workflows should be more useful and convenient.So I expect that this bug can be fixed ASAP.


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



[GitHub] [dolphinscheduler] CalvinKirs commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-886346506


   this design looks not resonable,The probability of name conflict is high, and other fields that have nothing to do with the actual business meaning, such as ID, should usually be selected.


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



[GitHub] [dolphinscheduler] JinyLeeChina commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
JinyLeeChina commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-891842056


   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.


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



[GitHub] [dolphinscheduler] ruanwenjun commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-884861753


   This is caused by DS add a restriction, you can not create two tasks that have the same task name in one project(This might be strange).


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



[GitHub] [dolphinscheduler] CalvinKirs commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-887619627


   > Here, I will provide a real use case to demonstrate. We have over 300 tasks and 50 workflows, and built some common shell tasks like checking prerequisite and monitoring. These common tasks would be used in many different workflows. As current restriction, I need to modify the task's name like check1 ,check2 ,check3 blah blah blah. It's pretty weird.
   
   Can you improvement it?


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



[GitHub] [dolphinscheduler] zhuangchong closed issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
zhuangchong closed issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875


   


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



[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-884628043


   Hi:
   * Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
   * In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
   * If you haven't received a reply for a long time, you can subscribe to the developer's email,Mail subscription steps reference https://dolphinscheduler.apache.org/zh-cn/community/development/subscribe.html ,Then write the issue URL in the email content and send question to dev@dolphinscheduler.apache.org.


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



[GitHub] [dolphinscheduler] calvinjiang commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
calvinjiang commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-887153770


   Here, I will provide a real use case to demonstrate. We have over 300 tasks and 50 workflows, and built some common shell tasks like checking prerequisite and monitoring. These common tasks would be used in many different workflows. As current restriction, I need to modify the task's name like check1 ,check2 ,check3 blah blah blah. It's pretty weird.


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



[GitHub] [dolphinscheduler] calvinjiang commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
calvinjiang commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-887146447


   @CalvinKirs Agreed.


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



[GitHub] [dolphinscheduler] calvinjiang commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
calvinjiang commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-888841136


   > > Here, I will provide a real use case to demonstrate. We have over 300 tasks and 50 workflows, and built some common shell tasks like checking prerequisite and monitoring. These common tasks would be used in many different workflows. As current restriction, I need to modify the task's name like check1 ,check2 ,check3 blah blah blah. It's pretty weird.
   > 
   > Can you improvement it?
   
   Yeah, I will be fixing it.


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



[GitHub] [dolphinscheduler] JinyLeeChina commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
JinyLeeChina commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-891844276


   I think the DagHelper should be refactored


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



[GitHub] [dolphinscheduler] JinyLeeChina edited a comment on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
JinyLeeChina edited a comment on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-891842056


   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.


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



[GitHub] [dolphinscheduler] CalvinKirs commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-891846196


   > I think the DagHelper should be refactored
   
   This PR #5942  is to solve this problem. Can you help him improve the overall design of this?


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



[GitHub] [dolphinscheduler] calvinjiang commented on issue #5875: [Bug][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

Posted by GitBox <gi...@apache.org>.
calvinjiang commented on issue #5875:
URL: https://github.com/apache/dolphinscheduler/issues/5875#issuecomment-892297935


   I will dig into the class of DagHelper. 


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