Commit 9383588b authored by Marek Vavrusa's avatar Marek Vavrusa

Reverted inconsistency checking since this wouldn't work with ixfr-from-differences.

parent c374b1da
......@@ -14,7 +14,6 @@ Bugfixes:
* Processing of knotc TSIG keyfile
* Atomic PID file writing, removed deprecated 'knotc start'
* Performance regression when RRSIGs came before covered RRs in AXFR
* Checks for inconsistent zone file / journal
v1.3.0-rc2 - Jun 14, 2013
-------------------------
......
......@@ -1010,32 +1010,6 @@ static int zones_journal_apply(knot_zone_t *zone)
return ret;
}
/*----------------------------------------------------------------------------*/
/* Backup journal and remove it.
* This is required when a zone file is manually updated (=> newer) while there
* are unprocessed changes in the journal file to prevent inconsistencies.
*/
static int zones_discard_journal(conf_zone_t *z)
{
log_server_warning("Journal file out of sync with '%s'.\n", z->name);
log_server_warning("Creating backup '%s.bak' and clearing it.\n", z->ixfr_db);
char *file_bak = strcdup(z->ixfr_db, ".bak");
if (file_bak == NULL)
return KNOT_ENOMEM;
/* This would be very strange since 'storage' is checked for 'rw' */
if (unlink(file_bak) != 0 || rename(z->ixfr_db, file_bak) != 0) {
log_server_error("Couldn't remove journal file '%s'.\n", z->ixfr_db);
free(file_bak);
return KNOT_ERROR;
}
free(file_bak);
return KNOT_EOK;
}
/*!
* \brief Insert new zone to the database.
*
......@@ -1075,7 +1049,7 @@ static int zones_insert_zone(conf_zone_t *z, knot_zone_t **dst,
/* Attempt to bootstrap if db or source does not exist. */
int ret = KNOT_ERROR;
int zone_changed = 0;
struct stat st_db, st_zone;
struct stat st_zone;
int stat_ret = stat(z->file, &st_zone);
if (zone != NULL) {
if (stat_ret == 0 && knot_zone_version(zone) < st_zone.st_mtime) {
......@@ -1085,17 +1059,6 @@ static int zones_insert_zone(conf_zone_t *z, knot_zone_t **dst,
zone_changed = 1;
}
/* Check for inconsistent zone <-> journal file. */
if (stat_ret == 0 && stat(z->ixfr_db, &st_db) == 0) {
if (st_zone.st_mtime > st_db.st_mtime) {
ret = zones_discard_journal(z);
if (ret != KNOT_EOK) {
knot_dname_free(&dname);
return ret;
}
}
}
/* Reload zone file. */
if (zone_changed) {
/* Zone file not exists and has master set. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment