Closed toco-cam closed 1 year ago
@tasso94: Is it fair to summarize the solution ideas as: "Implementing the improved approach for setting removal time, we introduced with "Removal Time Based" for the clean-up job, now for batch"?
Maybe something like this:
"Implementing an improved approach (avoiding database transaction timeouts) for setting a removal time via batch, inspired by the battle-proven approach we use for the removal time based history cleanup strategy".
Or:
"Avoiding database transaction timeouts when setting a removal time via batch, inspired by the battle-proven approach we use for the removal time based history cleanup strategy".
User Story (Required on creation)
see https://github.com/camunda/product-hub/issues/1521
Functional Requirements (Required before implementation)
see https://github.com/camunda/product-hub/issues/1521
Technical Requirements (Required before implementation)
newRemovalTime != REMOVAL_TIME_
(i.e., only update rows where removal time differs from the current removal time).Limitations of Scope
Hints
Links
Breakdown
Backend
SetRemovalTimeJsonConverter
as well. Also, add an attribute that defines the chunk size with it.invocationsPerBatchJob
through the batch job handler, e.g. return1
inProcessSetRemovalTimeJobHandler
when the new flag is enabled. By default, return the defined engine config value. This ensures we only handle one process instance per job when the flag is enabled.MessageEntity
repeatable, so batch jobs are not always deleted after one execution but can be rescheduled. ThepostExecute
method of the entity needs to be adjusted so it considers an attribute to decide whether it should be deleted or not, e.g. therepeat
attribute or a new one.ProcessSetRemovalTimeJobHandler
, collect the update operations and hand them over (together with a reference to the current job) to a newTransactionListener
on the stateTransactionState.COMMITTED
.500
. The chunk size can also be provided as input for the operation (e.g. via REST API).REST API
updateInChunks
to the set removal time endpoint.updateChunkSize
to the set removal time endpoint.Dev2QA handover