Avoid using a waiting db for single-message-only transports. Performance
authorJeremy Harris <jgh146exb@wizmail.org>
Tue, 11 Sep 2012 22:11:16 +0000 (23:11 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Tue, 11 Sep 2012 22:11:16 +0000 (23:11 +0100)
bug 1262 and patch from Paul Fisher.  Testcase 0288 exercises.

doc/doc-txt/ChangeLog
src/src/transports/smtp.c

index c528ada99512787a0e5950944729641ae9fb4014..f9eaaf7a9dd6e7ccff4f43b6648807bd1b6f0812 100644 (file)
@@ -68,6 +68,9 @@ JH/05 Permit multiple router/transport headers_add/remove lines.
 
 JH/06 Add dnsdb pseudo-lookup "a+" to do an "aaaa" + "a" combination.
 
+JH/07 Avoid using a waiting database for a single-message-only transport.
+      Performance patch from Paul Fisher.
+
 Exim version 4.80
 -----------------
 
index f7af921af6ee0e2ebc01b0ebbf9210a57bf31b66..36a053f2cdf0f774c13f5f8edae952bbcad36c81 100644 (file)
@@ -3114,9 +3114,12 @@ for (addr = addrlist; addr != NULL; addr = addr->next)
 /* Update the database which keeps information about which messages are waiting
 for which hosts to become available. For some message-specific errors, the
 update_waiting flag is turned off because we don't want follow-on deliveries in
-those cases. */
+those cases.  If this transport instance is explicitly limited to one message
+per connection, follow-on deliveries are not possible, and there's no need
+to create/update a waiting database. */
 
-if (update_waiting) transport_update_waiting(hostlist, tblock->name);
+if (update_waiting && tblock->connection_max_messages != 1)
+  transport_update_waiting(hostlist, tblock->name);
 
 END_TRANSPORT: