You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "HSLife1991 (via GitHub)" <gi...@apache.org> on 2024/03/21 14:25:18 UTC

[I] [Bug] [Master] fail when submit workflow instance [dolphinscheduler]

HSLife1991 opened a new issue, #15753:
URL: https://github.com/apache/dolphinscheduler/issues/15753

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### What happened
   
   Caused by: org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
           at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:80)
   
   18:18
    at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
           at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:650)
           at org.apache.dolphinscheduler.server.master.runner.MasterSchedulerBootstrap.run(MasterSchedulerBootstrap.java:134)
   Caused by: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result
   (or
   null) to be returned by selectOne(), but found: 2
           at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:96)
           at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
           at com.sun.proxy.$Proxy134.selectOne(Unknown Source)
           at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)
           at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)
           at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
           at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
           at com.sun.proxy.$Proxy175.queryByTypeAndJobId(Unknown Source)
           at org.apache.dolphinscheduler.service.process.TriggerRelationServiceImpl.queryByTypeAndJobId(TriggerRelationServiceImpl.java:50)
           at org.apache.dolphinscheduler.service.process.TriggerRelationServiceImpl.saveProcessInstanceTrigger(TriggerRelationServiceImpl.java:65)
           at org.apache.dolphinscheduler.service.process.ProcessServiceImpl.handleCommand(ProcessServiceImpl.java:342)
           at org.apache.dolphinscheduler.service.process.ProcessServiceImpl$$FastClassBySpringCGLIB$$9d3e18f9.invoke(<generated>)
   
   ### What you expected to happen
   
   correct create workflow instance
   
   ### How to reproduce
   
   1.create a workflow with no scheduler
   2.run the workflow
   
   ### Anything else
   
   no
   
   ### Version
   
   3.2.x
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Master] fail when submit workflow instance [dolphinscheduler]

Posted by "peak-xu (via GitHub)" <gi...@apache.org>.
peak-xu commented on issue #15753:
URL: https://github.com/apache/dolphinscheduler/issues/15753#issuecomment-2021806274

   I encountered the same problem


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


Re: [I] [Bug] [Master] fail when submit workflow instance [dolphinscheduler]

Posted by "KevinLvLight (via GitHub)" <gi...@apache.org>.
KevinLvLight commented on issue #15753:
URL: https://github.com/apache/dolphinscheduler/issues/15753#issuecomment-2019500705

   We met the same problem, and we found the SQL according log:
   [TriggerRelationMapper.xml](https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TriggerRelationMapper.xml)
   
   `<sql id="baseSql">
           id, trigger_code, trigger_type, job_id, create_time, update_time
       </sql>
   
       <select id="queryByTypeAndJobId" resultType="org.apache.dolphinscheduler.dao.entity.TriggerRelation">
           select
           <include refid="baseSql"/>
           from t_ds_trigger_relation
           WHERE trigger_type = #{triggerType} and job_id =  #{jobId}
       </select>
   `
   But we donot known how this occured and how to solve 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


Re: [I] [Bug] [Master] fail when submit workflow instance [dolphinscheduler]

Posted by "xuet0ng (via GitHub)" <gi...@apache.org>.
xuet0ng commented on issue #15753:
URL: https://github.com/apache/dolphinscheduler/issues/15753#issuecomment-2102215490

   meet the same problem. I take following 3 steps  to temporarily avoid this issue:
   1. backup t_ds_trigger_relation
   2. delete from t_ds_trigger_relation
   3. restart dolphinscheduler
   


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


Re: [I] [Bug] [Master] fail when submit workflow instance [dolphinscheduler]

Posted by "peak-xu (via GitHub)" <gi...@apache.org>.
peak-xu commented on issue #15753:
URL: https://github.com/apache/dolphinscheduler/issues/15753#issuecomment-2111645644

   > the job_id of t_ds_trigger_relation based on id of t_ds_command which is auto incr by mysql but the auto incr is reset by some way (maybe truncate in a dev env.)
   
   It seems like a serious bug, but why haven't others encountered 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


Re: [I] [Bug] [Master] fail when submit workflow instance [dolphinscheduler]

Posted by "xuet0ng (via GitHub)" <gi...@apache.org>.
xuet0ng commented on issue #15753:
URL: https://github.com/apache/dolphinscheduler/issues/15753#issuecomment-2102253221

   the job_id of t_ds_trigger_relation based on id of t_ds_command which is auto incr by mysql
   but the auto incr is reset by some way (maybe truncate in a dev env.)


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