[Bug] DuplicateKeyException encountered while retrieving the job execution history #277
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
immediately after task execution start, task instance page is opened. For small jobs it is throwing following errors
2025-01-29 12:06:18.800 seatunnel WM-TVJM7KC4Y4 ERROR [tr:,sp:] [qtp431300939-38] [GlobalExceptionHandler.logError():78] -
Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '16473878314272' for key 't_st_job_instance_history.PRIMARY'
The error may exist in org/apache/seatunnel/app/dal/mapper/JobInstanceHistoryMapper.java (best guess)
The error may involve org.apache.seatunnel.app.dal.mapper.JobInstanceHistoryMapper.insert-Inline
The error occurred while setting parameters
SQL: INSERT INTO t_st_job_instance_history ( id, dag ) VALUES ( ?, ? )
Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '16473878314272' for key 't_st_job_instance_history.PRIMARY'
; Duplicate entry '16473878314272' for key 't_st_job_instance_history.PRIMARY'; nested exception is java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '16473878314272' for key 't_st_job_instance_history.PRIMARY'
org.springframework.dao.DuplicateKeyException:
Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '16473878314272' for key 't_st_job_instance_history.PRIMARY'
The error may exist in org/apache/seatunnel/app/dal/mapper/JobInstanceHistoryMapper.java (best guess)
The error may involve org.apache.seatunnel.app.dal.mapper.JobInstanceHistoryMapper.insert-Inline
The error occurred while setting parameters
SQL: INSERT INTO t_st_job_instance_history ( id, dag ) VALUES ( ?, ? )
Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '16473878314272' for key 't_st_job_instance_history.PRIMARY'
; Duplicate entry '16473878314272' for key 't_st_job_instance_history.PRIMARY'; nested exception is java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '16473878314272' for key 't_st_job_instance_history.PRIMARY'
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:247)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
at jdk.proxy2/jdk.proxy2.$Proxy85.insert(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272