[exim-dev] [Bug 1802] Rspamd scan should not use shutdown ca…

Etusivu
Poista viesti
Vastaa
Lähettäjä: admin
Päiväys:  
Vastaanottaja: exim-dev
Vanhat otsikot: [exim-dev] [Bug 1802] New: Rspamd is scan should not use shutdown call
Aihe: [exim-dev] [Bug 1802] Rspamd scan should not use shutdown call
https://bugs.exim.org/show_bug.cgi?id=1802

--- Comment #13 from vsevolod@??? ---
I can confirm that Rspamd never ever used shutdown for end-of-input indication.
The problem with shutdown is fairly simple. SA has never ever cared about their
performance (and that's why I've created Rspamd in fact), so they don't care
about wasting resources when a client (namely, Exim) decides to terminate a
connection due to timeout waiting. Rspamd, on the contrary, can handle this
situation and stop all asynchronous request being planned (e.g. DNS, HTTP or
Redis) to save resources.

Unfortunately, in BSD sockets there is no *reliable* way to distinguish half
close from full close without writing to as socket non-zero amount of data
(which is impossible by protocol). In Linux, there is 'EV_CLOSE' flag for epoll
in libevent but it is not portable at all.

Hence, I'm suggesting to drop this legacy shutdown call for Rspamd: it has been
never ever really used by Rspamd and it stops me for optimizing Rspamd for all
platforms (as I have to support Exim incorrect semantics).

Furthermore, Exim now is the only client that uses legacy SA like protocol to
communicate with Rspamd: all other systems use the ordinary HTTP and JSON for
their requests. Again, due to this fact I have to support a lot of legacy and
intrusive assumptions in my protocol parser which doesn't make me happy. But
this is more intrusive change to Exim as far as I understand. Since it doesn't
really affect on performance I'm not forcing this change. However, shutdown is
really annoying.

--
You are receiving this mail because:
You are on the CC list for the bug.