]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1693. [bug] max-journal-size was not effective for master zones
authorMark Andrews <marka@isc.org>
Thu, 29 Jul 2004 00:17:06 +0000 (00:17 +0000)
committerMark Andrews <marka@isc.org>
Thu, 29 Jul 2004 00:17:06 +0000 (00:17 +0000)
                        with ixfr-from-differences set. [RT# 12024]

CHANGES
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index 6222456adac3df64970ab38bd6547872e0eef223..f3fdad60670993ce1981873d487da60eb9177472 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,8 @@
 1694.  [bug]           Report if the builtin views of "_default" / "_bind"
                        are defined in named.conf. [RT #12023]
 
-1693.  [placeholder]   rt12024
+1693.  [bug]           max-journal-size was not effective for master zones
+                       with ixfr-from-differences set. [RT# 12024]
 
 1692.  [bug]           Don't set -I, -L and -R flags when libcrypto is in
                        /usr/lib. [RT #11971]
index bb855c7e37453c593d5354eefad95218d4f85353..fe1d263f34d28b4a5b5ca615b7c96f06efbc14fe 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.416 2004/06/04 02:40:50 marka Exp $ */
+/* $Id: zone.c,v 1.417 2004/07/29 00:17:06 marka Exp $ */
 
 #include <config.h>
 
@@ -5235,6 +5235,31 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump) {
                        goto fail;
                if (dump)
                        zone_needdump(zone, DNS_DUMP_DELAY);
+               else if (zone->journalsize != -1) {
+                       isc_uint32_t serial;
+
+                       result = dns_db_getsoaserial(db, ver, &serial);
+                       if (result == ISC_R_SUCCESS) {
+                               result = dns_journal_compact(zone->mctx,
+                                                            zone->journal,
+                                                            serial,
+                                                            zone->journalsize);
+                               switch (result) {
+                               case ISC_R_SUCCESS:
+                               case ISC_R_NOSPACE:
+                               case ISC_R_NOTFOUND:
+                                       dns_zone_log(zone, ISC_LOG_DEBUG(3),
+                                                    "dns_journal_compact: %s",
+                                                    dns_result_totext(result));
+                                       break;
+                               default:
+                                       dns_zone_log(zone, ISC_LOG_ERROR,
+                                            "dns_journal_compact failed: %s",
+                                                    dns_result_totext(result));
+                                       break;
+                               }
+                       }
+               }
        } else {
                if (dump && zone->masterfile != NULL) {
                        isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,