BIND 10 trac1357, updated. 5c5f0831bee890e2245339d6f29b03ff33f94f9f [1357] Create only one Diff

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Sep 20 11:08:56 UTC 2012


The branch, trac1357 has been updated
       via  5c5f0831bee890e2245339d6f29b03ff33f94f9f (commit)
      from  7feae4486ab8b722cdf897bcf629391e7c15fcf1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5c5f0831bee890e2245339d6f29b03ff33f94f9f
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Thu Sep 20 13:06:59 2012 +0200

    [1357] Create only one Diff
    
    It failed to commit the previous changes, as it created new Diff and the
    old was just forgotten.

-----------------------------------------------------------------------

Summary of changes:
 src/bin/xfrin/xfrin.py.in |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/xfrin/xfrin.py.in b/src/bin/xfrin/xfrin.py.in
index 88411ed..2b65311 100755
--- a/src/bin/xfrin/xfrin.py.in
+++ b/src/bin/xfrin/xfrin.py.in
@@ -362,6 +362,7 @@ class XfrinFirstData(XfrinState):
                 conn._request_serial == get_soa_serial(rr.get_rdata()[0]):
             logger.debug(DBG_XFRIN_TRACE, XFRIN_GOT_INCREMENTAL_RESP,
                          conn.zone_str())
+            conn._diff = None # Will be created on-demand
             self.set_xfrstate(conn, XfrinIXFRDeleteSOA())
         else:
             logger.debug(DBG_XFRIN_TRACE, XFRIN_GOT_NONINCREMENTAL_RESP,
@@ -380,11 +381,13 @@ class XfrinIXFRDeleteSOA(XfrinState):
             raise XfrinException(rr.get_type().to_text() +
                                  ' RR is given in IXFRDeleteSOA state')
         # This is the beginning state of one difference sequence (changes
-        # for one SOA update).  We need to create a new Diff object now.
+        # for one SOA update).  We may need to create a new Diff object now.
         # Note also that we (unconditionally) enable journaling here.  The
         # Diff constructor may internally disable it, however, if the
         # underlying data source doesn't support journaling.
-        conn._diff = Diff(conn._datasrc_client, conn._zone_name, False, True)
+        if conn._diff is None:
+            conn._diff = Diff(conn._datasrc_client, conn._zone_name, False,
+                              True)
         conn._diff.delete_data(rr)
         self.set_xfrstate(conn, XfrinIXFRDelete())
         conn.get_transfer_stats().ixfr_deletion_count += 1



More information about the bind10-changes mailing list