jeantil commented on PR #1085: URL: https://github.com/apache/james-project/pull/1085#issuecomment-1183456723
I'm unable to connect to GitHub today and checked the diff from my phone. Sorry if my questions are naive because of the reduced context. - As it, releasing the session rethrows any Exception by wrapping it in a MessagingException. Won't this end in the delivery being marked as failed internally even if the mail was actually accepted ? I would have expected an implementation similar to that of `closeTransport` which logs an error but doesn't rethrows to preserve the delivery status. - I haven't traced the flow completely (not trivial on mobile GitHub:) but what happens if closeTransport throws ? (Could that end up in sessions that are never released back to the pool ?) Le mer. 13 juil. 2022 à 14:56, Karsten Otto ***@***.***> a écrit : > Remote Delivery now uses pools of SMTP and SMTPS sessions. This prevents a > race condition in setting per-delivery properties. > > The pools replace the former shared session objects. During > tryDeliveryToHost(), the selectSession() method now borrows a session from > the appropriate pool. Its properties can be changed as necessary for the > current delivery. Once delivery is done, the new method releaseSession() > finally returns this session to its pool. The pool resets any delivery > specific properties to prevent information leaks. > > The session pools are unbounded, so they can scale to whatever maximum > thread concurrency is required. Otherwise, the default pool configuration > should be fine. > ------------------------------ > You can view, comment on, or merge this pull request online at: > > https://github.com/apache/james-project/pull/1085 > Commit Summary > > - c32022d > <https://github.com/apache/james-project/pull/1085/commits/c32022da7bcca34c8cfcdec6b9ffbf7d2ee1c0bb> > JAMES-3791 Remote Delivery uses a pool of SMTP sessions. > > File Changes > > (3 files <https://github.com/apache/james-project/pull/1085/files>) > > - *M* pom.xml > <https://github.com/apache/james-project/pull/1085/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8> > (5) > - *M* server/mailet/mailets/pom.xml > <https://github.com/apache/james-project/pull/1085/files#diff-9d3114c9f7c96e1a9621d57e46449692a0c2e48f66094f9af4e4c28039c8a912> > (4) > - *M* > server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remote/delivery/MailDelivrerToHost.java > <https://github.com/apache/james-project/pull/1085/files#diff-1d5b59ba753b2ffbbf95aea348faa2b2025338d7d96140f2b17ee7e60fb042eb> > (67) > > Patch Links: > > - https://github.com/apache/james-project/pull/1085.patch > - https://github.com/apache/james-project/pull/1085.diff > > — > Reply to this email directly, view it on GitHub > <https://github.com/apache/james-project/pull/1085>, or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAAFTQ7MP5VH7HEWRNJ5Z5TVT24HFANCNFSM53OUGCVA> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> > -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
