Feature #43624
openProposal: Asynchronous cascading date updates using Active Job (batch processing of issue relations)
0%
Description
Summary
When updating the due date of an issue, Redmine performs cascading date updates across related issues by traversing issue relations.
If the relation graph is deep or large, executing this traversal synchronously can significantly increase execution time, leading to timeouts or severe performance degradation.
This ticket proposes an improvement: using Rails Active Job to execute cascading date updates and relation traversal asynchronously, reducing request latency and improving scalability.
Background / Motivation
- The cost of relation traversal increases with the depth and size of the relation graph
- Synchronous execution within a web request is prone to timeouts
- In projects that heavily rely on issue relations, due date updates become impractical
Proposal (based on Active Job)
1) Enqueue a cascading update job on due date update
- After the due date update transaction is committed, enqueue a cascading update job via Active Job
- The update request should return without waiting for the cascading updates to complete
2) Process relation traversal in batches
- Traverse related issues iteratively using a queue-based approach instead of deep recursion
- Limit the number of issues processed per job and continue the remaining work in subsequent jobs if necessary
3) Ensure idempotency and avoid duplication
- Use a job identifier per root issue to avoid duplicate cascading update jobs
- Track processed issues to prevent infinite loops and redundant updates
Expected behavior
- Due date updates complete within a reasonable time
- Cascading date updates are completed reliably in the background
- Large or deep relation graphs no longer cause request timeouts
Considerations
- Semantic consistency of relations (e.g. precedes / follows) must be preserved
- Concurrency and consistency when the same issue is updated again while cascading updates are running
- Execution characteristics depend on the configured Active Job backend
Prerequisite for Active Job
- This proposal assumes an environment where Active Job is enabled and background job execution is available
- In environments without a job backend, an alternative approach (e.g. bounded synchronous processing) may be required
Notes
- This proposal addresses performance issues related to cascading date updates across issue relations
- It is intended as a general scalability improvement and is not specific to a particular Redmine version
No data to display