linagora / james-project

Mirror of Apache James Project
Apache License 2.0
72 stars 62 forks source link

[CNB] Ensure all IMAP processors are safe to run out of event loop #5325

Open chibenwa opened 3 days ago

chibenwa commented 3 days ago

IMAP reactive throttler might run requests out of the event loop underload

(to cap number of sync requests)

We need to ensure all our processors are safe to run out of the event loop

Setter on Scheduler to use in ImapServer + default to scheduler == Immediate?

(We need our test suite to accept IMAP commands to be executed both on and outside of the event loop)

chibenwa commented 3 days ago

Looks pretty bad actually: when executing from another scheduler IMAP sequential execution is no longer guarantied...

image

This is due to several variable to be computed when building the reactive chain and may be outdated when executing it... Maybe defering evaluation of those variables may be enough?

Commands pushing a line handler like AUTH, COMPRESS, IDLE & friends are also impacted. Fixing those in an open problem...