Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [datastudio] Data too long for column 'job_id'(varchar(50)) in table dinky_history #3196

Closed
2 of 3 tasks
jiangwwwei opened this issue Feb 28, 2024 · 2 comments · Fixed by #3200 or #3210
Closed
2 of 3 tasks
Labels
Bug Something isn't working
Milestone

Comments

@jiangwwwei
Copy link

jiangwwwei commented Feb 28, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

after submit a task on k8s application ,the task status is not associated
(The task ran successfully in practice)
image
image
image


error log:
Process Step SUBMIT_EXECUTE exit with status:FAILED
org.springframework.dao.DataIntegrityViolationException: 
### Error updating database.  Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'job_id' at row 1
### The error may exist in org/dinky/mapper/HistoryMapper.java (best guess)
### The error may involve org.dinky.mapper.HistoryMapper.updateById-Inline
### The error occurred while setting parameters
### SQL: UPDATE dinky_history SET job_id = ?, job_manager_address = ?, batch_model = ?, status = ?, error = ?, end_time = ? WHERE id = ? AND tenant_id = 1
### Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'job_id' at row 1
; Data truncation: Data too long for column 'job_id' at row 1; nested exception is com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'job_id' at row 1
	at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:104)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
	at com.sun.proxy.$Proxy154.update(Unknown Source)
	at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:288)
	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:64)
	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.$Proxy165.updateById(Unknown Source)
	at com.baomidou.mybatisplus.extension.service.IService.updateById(IService.java:239)
	at com.baomidou.mybatisplus.extension.service.IService$$FastClassBySpringCGLIB$$f8525d18.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386)
	at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704)
	at org.dinky.service.impl.HistoryServiceImpl$$EnhancerBySpringCGLIB$$6fa58798.updateById(<generated>)
	at org.dinky.job.handler.Job2MysqlHandler.failed(Job2MysqlHandler.java:220)
	at org.dinky.job.JobManager.failed(JobManager.java:234)
	at org.dinky.job.JobManager.executeSql(JobManager.java:361)
	at org.dinky.service.task.FlinkSqlTask.execute(FlinkSqlTask.java:67)
	at org.dinky.service.impl.TaskServiceImpl.executeJob(TaskServiceImpl.java:189)
	at org.dinky.service.impl.TaskServiceImpl$$FastClassBySpringCGLIB$$22087f7c.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
	……

What you expected to happen

The task status is associated normally.

How to reproduce

dinky version : 1.0.0 rc4
execute mode : k8s application
job_name: test-long-jobname-12345678902701234567890123
(The length of 'job_name' exceeds 18 characters )

in this dinky version,
job_id = job_name + 32_characters_id,
But the default length limit for the job_id field is only 50 characters. (varchar(50))

Anything else

Executing the following SQL can temporarily resolve the issue.

alter table dinky_history modify job_id varchar(100) null comment 'Job ID';

Version

1.0.0

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@jiangwwwei jiangwwwei added Bug Something isn't working Waiting for reply Waiting for reply labels Feb 28, 2024
@aiwenmo
Copy link
Contributor

aiwenmo commented Feb 28, 2024

Welcome to pull request to fix it.

@Zzm0809
Copy link
Contributor

Zzm0809 commented Mar 1, 2024

#3210

@Zzm0809 Zzm0809 linked a pull request Mar 1, 2024 that will close this issue
@aiwenmo aiwenmo moved this from Doing to Done in Dinky Roadmap Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Archived in project
3 participants