james-project icon indicating copy to clipboard operation
james-project copied to clipboard

Move blocking readPair call to boundedElastic thread

Open Arooba-git opened this issue 2 years ago • 1 comments

Hi! 🙂

We noticed you did a great job in ensuring the reactive modules indeed stay reactive end to end. The mailbox module, however, was discovered to still have a blocking call in CassandraMessageMapper class as detected by BlockHound: james3-blocking

This PR fixes this code. We also re-ran the tests and verified the performance (in terms of heap usage) before and after the fix:

Before james3-heap-before

After

james3-heap-after

Arooba-git avatar Jul 23 '23 09:07 Arooba-git

Also read repair could be a good place for pseudo random usage aka non blocking...

There is no need for cryptographioc grade randomness for such an application.

Maybe otherall this could be a better fix. WDYT?

chibenwa avatar Jul 25 '23 06:07 chibenwa