From: Jeremy Harris Date: Wed, 19 Jun 2024 14:29:00 +0000 (+0100) Subject: Avoid retry db lookups in first phase of 2-phase queue run X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/6748707c644648e9dc1c7f6249cf443aca8a0d13 Avoid retry db lookups in first phase of 2-phase queue run --- diff --git a/src/src/deliver.c b/src/src/deliver.c index 2ac56e171..d2b2c3ab2 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -6543,7 +6543,7 @@ opening the data file, message_subdir gets set. */ if ((deliver_datafile = spool_open_datafile(id)) < 0) return continue_closedown(); /* yields DELIVER_NOT_ATTEMPTED */ -/* tHe value of message_size at this point has been set to the data length, +/* The value of message_size at this point has been set to the data length, plus one for the blank line that notionally precedes the data. */ /* Now read the contents of the header file, which will set up the headers in @@ -7271,9 +7271,13 @@ while (addr_new) /* Loop until all addresses dealt with */ address_item * addr, * parent; /* Failure to open the retry database is treated the same as if it does - not exist. In both cases, dbm_file is NULL. */ + not exist. In both cases, dbm_file is NULL. For the first stage of a 2-phase + queue run don't bother checking domain- or address-retry info; they will take + effect on the second stage. */ - if (!(dbm_file = dbfn_open(US"retry", O_RDONLY, &dbblock, FALSE, TRUE))) + if (f.queue_2stage) + dbm_file = NULL; + else if (!(dbm_file = dbfn_open(US"retry", O_RDONLY, &dbblock, FALSE, TRUE))) DEBUG(D_deliver|D_retry|D_route|D_hints_lookup) debug_printf("no retry data available\n");