From: Michal 'vorner' Vaner Date: Thu, 20 Sep 2012 11:06:59 +0000 (+0200) Subject: [1357] Create only one Diff X-Git-Tag: trac2351_base~49^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c5f0831bee890e2245339d6f29b03ff33f94f9f;p=thirdparty%2Fkea.git [1357] Create only one Diff It failed to commit the previous changes, as it created new Diff and the old was just forgotten. --- diff --git a/src/bin/xfrin/xfrin.py.in b/src/bin/xfrin/xfrin.py.in index 88411ed7ac..2b65311baa 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