]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
952. [bug] The server required manual intervention to serve the
authorMark Andrews <marka@isc.org>
Mon, 6 Aug 2001 02:10:59 +0000 (02:10 +0000)
committerMark Andrews <marka@isc.org>
Mon, 6 Aug 2001 02:10:59 +0000 (02:10 +0000)
                        affected zones if it died between creating a journal
                        and committing the first change to it.

CHANGES
lib/dns/journal.c

diff --git a/CHANGES b/CHANGES
index 2fd2b75c0f1d77d3ed1e56f79749605acd4e5476..595d358543cfa9eb373db80bb2cf7e9c26aa043d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+ 952.  [bug]           The server required manual intervention to serve the
+                       affected zones if it died between creating a journal
+                       and committing the first change to it.
 
  951.  [bug]           CFLAGS was not passed to the linker when
                        linking some of the test programs under
index eb79de2cef687b5adfbd53b3096682cc2cebf774..54c4c4480cbf3f0d37efba6b3f8f6e94c7416830 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: journal.c,v 1.76 2001/06/04 19:33:02 tale Exp $ */
+/* $Id: journal.c,v 1.77 2001/08/06 02:10:59 marka Exp $ */
 
 #include <config.h>
 
@@ -603,18 +603,6 @@ dns_journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write,
        }
        journal_header_decode(&rawheader, &j->header);
 
-       /*
-        * When opening a journal for reading, it is not supposed to
-        * be empty - if there are no transactions, the file should
-        * not exist.
-        */
-       if (! write && JOURNAL_EMPTY(&j->header)) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "%s: journal unexpectedly empty",
-                             j->filename);
-               FAIL(ISC_R_UNEXPECTED);
-       }
-
        /*
         * If there is an index, read the raw index into a dynamically
         * allocated buffer and then convert it into a cooked index.
@@ -1334,7 +1322,10 @@ dns_journal_rollforward(isc_mem_t *mctx, dns_db_t *db, const char *filename) {
        }
        if (result != ISC_R_SUCCESS)
                return (result);
-       result = roll_forward(j, db);
+       if (JOURNAL_EMPTY(&j->header))
+               result = DNS_R_UPTODATE;
+       else
+               result = roll_forward(j, db);
 
        dns_journal_destroy(&j);