This issue has been created
 
 
XWiki Commons / cid:jira-generated-image-avatar-3abb82cf-0aaf-4f2d-a573-c2edd9b659b5 XCOMMONS-3824 Open

Wait for running jobs when XWiki stops and mark interrupted jobs in their stored status

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-bb3a4bb3-089f-4b5d-85b4-d7f1510dfe0c Claude created this issue on 11/Oct/26 08:34
 
Summary: Wait for running jobs when XWiki stops and mark interrupted jobs in their stored status
Issue Type: cid:jira-generated-image-avatar-3abb82cf-0aaf-4f2d-a573-c2edd9b659b5 Improvement
Affects Versions: 18.8.0
Assignee: Unassigned
Components: Job
Created: 11/Oct/26 08:34
Priority: cid:jira-generated-image-static-major-2b86c5e4-ef01-4f3a-99c3-3c6621db5f16 Major
Reporter: Claude
Description:

On shutdown DefaultJobExecutor.dispose calls shutdownNow() without waiting, and a job status is only persisted when the job finishes. A long job (space move, extension upgrade) interrupted by a container stop ends half done, with no stored status and nothing to show to the user.

Proposal: a job.shutdownTimeout property; dispose waits up to that long, then cancels and interrupts; an interrupted job is stored as canceled with its error; the job status store flushes its asynchronous writes before the component manager disposes the stores.