You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my usecase we have Java stacktraces as Exit Message.
These stacktraces are currently truncated because of the default 2500 limit.
This is a problem because the important part to the stack (caused by) is at the end and, oftenly, it's truncated.
In org.springframework.batch.core.repository.support.JobRepositoryFactoryBean#setMaxVarCharLength
It would be nice to have the possibility to specify a distinct value for short_context and exit_message.
Because it is not a problem if short_context is truncated for me, but it is for exit_message.
As I'm going to increase that limit, I also need to update the MySQL schema for short_context, to avoir problems with the varchar(2500):
ALTER TABLE BATCH_JOB_EXECUTION MODIFY EXIT_MESSAGE TEXT;
ALTER TABLE BATCH_STEP_EXECUTION MODIFY EXIT_MESSAGE TEXT;
ALTER TABLE BATCH_STEP_EXECUTION_CONTEXT MODIFY SHORT_CONTEXT TEXT;
ALTER TABLE BATCH_JOB_EXECUTION_CONTEXT MODIFY SHORT_CONTEXT TEXT;
By the way, it would be nice to be able to deactivate the truncation, in case the engine can truncate the exit_message itself. In MySQL, the TEXT type will handle the truncation, so I can safely put MAX_INT as a limit in setMaxVarCharLength
Affects: 2.1.9
The text was updated successfully, but these errors were encountered:
I do confirm, the maxVarCharLength is used for both exitMessageLength and shortContextLength. When increased to a high value to support long stack traces, we would allocate more space than needed for the shortContext, which is obviously wasteful. So the suggested improvement makes sense to me. Thank you for this suggestion!
You are welcome to open a PR on github and we will consider merging it in a future version.
fmbenhassine
changed the title
Decorelate short_context and exit_message size/truncation in DB storage [BATCH-1978]
Use separate parameters for short_context length and exit_message length
Oct 12, 2022
Sebastien Lorber opened BATCH-1978 and commented
Hello,
In my usecase we have Java stacktraces as Exit Message.
These stacktraces are currently truncated because of the default 2500 limit.
This is a problem because the important part to the stack (caused by) is at the end and, oftenly, it's truncated.
In org.springframework.batch.core.repository.support.JobRepositoryFactoryBean#setMaxVarCharLength
It would be nice to have the possibility to specify a distinct value for short_context and exit_message.
Because it is not a problem if short_context is truncated for me, but it is for exit_message.
As I'm going to increase that limit, I also need to update the MySQL schema for short_context, to avoir problems with the varchar(2500):
ALTER TABLE BATCH_JOB_EXECUTION MODIFY EXIT_MESSAGE TEXT;
ALTER TABLE BATCH_STEP_EXECUTION MODIFY EXIT_MESSAGE TEXT;
ALTER TABLE BATCH_STEP_EXECUTION_CONTEXT MODIFY SHORT_CONTEXT TEXT;
ALTER TABLE BATCH_JOB_EXECUTION_CONTEXT MODIFY SHORT_CONTEXT TEXT;
By the way, it would be nice to be able to deactivate the truncation, in case the engine can truncate the exit_message itself. In MySQL, the TEXT type will handle the truncation, so I can safely put MAX_INT as a limit in setMaxVarCharLength
Affects: 2.1.9
The text was updated successfully, but these errors were encountered: