-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Exception in History-Cleanup produces ByteArray without removal time #3288
Comments
I wonder if the if statement is needed at all in So maybe this can also be fixed by just removing the condition when setting the byte array removal time. Think about it another way: The job log event and the byte array should probably never have different removal times. So just copying the job log's removal time over unconditionally sounds reasonable. |
Review hints:
|
- Remove unused list from history cleanup jobs - Initialize configuration using ProcessEngineBootstrapRule instead to fix stateful propagation of ProvidedProcessEngineRule config - To achieve the above point, EntityRemoveRule now supports lazy initialization - RuleChainBuilder to simplify Chain creation from the clients perspective Related to: #3288
- Use testRule#deleteHistoryCleanupJobs to cleanup history jobs instead - Remove RuleChainBuilder (hides the rules from test class & makes it inconvenient) Related to: #3288
- Remove unused list from history cleanup jobs - Initialize configuration using ProcessEngineBootstrapRule instead to fix stateful propagation of ProvidedProcessEngineRule config - To achieve the above point, EntityRemoveRule now supports lazy initialization - RuleChainBuilder to simplify Chain creation from the clients perspective Related to: #3288
- Use testRule#deleteHistoryCleanupJobs to cleanup history jobs instead - Remove RuleChainBuilder (hides the rules from test class & makes it inconvenient) Related to: #3288
- Use testRule#deleteHistoryCleanupJobs to clean-up history jobs instead - Remove Unused list from history clean-up jobs - Use ProcessEngineBootstrapRule instead to fix Config Propagation issues - To achieve the above point, EntityRemoveRule now supports lazy initialization Related to: #3288
- Use testRule#deleteHistoryCleanupJobs to clean-up history jobs instead - Remove Unused list from history clean-up jobs - Use ProcessEngineBootstrapRule instead to fix Config Propagation issues - To achieve the above point, EntityRemoveRule now supports lazy initialization Related to: #3288
- removalTime of a failing clean-up job's bytearray was null. As a result, that entry was not getting cleaned up. This fix ensures passing the value through. Related to: #3288
Assigning for a backport review. |
Backport review: done. |
Environment (Required on creation)
Reported in 7.18.5-ee. Also reproduced in latest version.
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)
Exceptions during history cleanup produce a job log with a corresponding
ByteArray
containing the stack trace. When thehistoryCleanupJobLogTimeToLive
is configured this job log contains the correctremovalTime
. However, the stack trace byte array entity does not have theremovalTime
set.As a consequence, these byte arrays will remain in the database and won't get cleaned up.
Steps to reproduce (Required on creation)
historyCleanupJobLogTimeToLive=1
commandContext
to nullACT_HI_JOB_LOG
andACT_GE_BYTEARRAY
records. TheremovalTime
is not set for the byte array which means it won't be cleaned up.Observed Behavior (Required on creation)
The history cleanup stack trace byte array has no
removalTime
set.The record will not get cleaned up from the database.
Expected behavior (Required on creation)
The history cleanup stack trace byte array has
removalTime
set.The record will get cleaned up from the database.
Root Cause (Required on prioritization)
The DefaultHistoryEventProducer skips setting the
removalTime
of the byte array when strategyend
is defined. This works fine with job log byte arrays that are related to process instances as they will get updated later when the corresponding PI has ended.However, history cleanup job log has no process instance relation so their byte arrays will remain in the database.
Solution Ideas
If the
HistoricJobLogEventEntity
has noprocessInstanceId
, the byte array could inherit the sameremovalTime
as the job log entity, regardless of the removal time strategy:In DefaultHistoryEventProducer.
Hints
Links
Breakdown
Dev2QA handover
The text was updated successfully, but these errors were encountered: