[prev in list] [next in list] [prev in thread] [next in thread] 

List:       james-dev
Subject:    [jira] [Commented] (JAMES-3890) Allow parallel execution of safe tasks
From:       "Benoit Tellier (Jira)" <server-dev () james ! apache ! org>
Date:       2023-02-22 1:32:00
Message-ID: JIRA.13525619.1676998275000.92257.1677029520011 () Atlassian ! JIRA
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/JAMES-3890?page=com.atlassian.jira.plugin. \
system.issuetabpanels:comment-tabpanel&focusedCommentId=17691851#comment-17691851 ] 

Benoit Tellier commented on JAMES-3890:
---------------------------------------

+1 for such a modification that is a long overdue follow up...

> Allow parallel execution of safe tasks
> --------------------------------------
> 
> Key: JAMES-3890
> URL: https://issues.apache.org/jira/browse/JAMES-3890
> Project: James Server
> Issue Type: Improvement
> Components: task
> Affects Versions: master
> Reporter: Karsten Otto
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
> 
> Currently, task execution in James is strictly serialized, through a single thread \
> executor and the single active consumer feature of RabbitMQ. Such serial execution \
> prevents tasks from interfering with each others operations. The majority of tasks \
> execute in few seconds, so this is fine. However, some tasks can take considerably \
> longer, from minutes to even hours. In that case, the *long running task will \
> effectively delay execution of any other task* until it is done! I noticed this \
> while experimenting with the {{{}ExpireMailboxTask{}}}, throttled down to 1 \
> user/sec for 1000 users; this would delay the periodic {{ReprocessingAllMailsTask}} \
> I use for mail re-delivery attempts. This is rather unfortunate, since the two \
> tasks have nothing in common to interfere with. I propose a change to the task \
> system, to allow parallel execution for certain long running "safe" tasks, in a \
> twofold sense: # The task will not likely interfere with the operations of regular \
> tasks. # The task gracefully handles issues that can arise from parallel execution. \
> E.g.   when listing mails and later accessing them, some may have been deleted in \
> the meantime. The aforementioned {{ExpireMailboxTask}} would be a good candidate \
> for this, maybe there are others.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic