}
DUMP_VAL(params, "zone-count", knot_zonedb_size(ctx->server->zone_db));
+ DUMP_VAL(params, "zone-update-error", ATOMIC_GET(ctx->server->stats.zone_update_error));
DUMP_VAL(params, "tcp-io-timeout", ATOMIC_GET(ctx->server->stats.tcp_io_timeout));
DUMP_VAL(params, "tcp-idle-timeout", ATOMIC_GET(ctx->server->stats.tcp_idle_timeout));
ret = commit_full(conf, update);
}
if (ret != KNOT_EOK) {
- return ret;
+ goto error;
}
conf_val_t thr = conf_zone_get(conf, C_ADJUST_THR, update->zone->name);
}
if (ret != KNOT_EOK) {
discard_adds_tree(update);
- return ret;
+ goto error;
}
/* Check the zone size. */
if (update->new_cont->size > size_limit) {
discard_adds_tree(update);
- return KNOT_EZONESIZE;
+ ret = KNOT_EZONESIZE;
+ goto error;
}
val = conf_zone_get(conf, C_DNSSEC_VALIDATION, update->zone->name);
ret = knot_dnssec_validate_zone(update, &val_conf);
if (ret != KNOT_EOK) {
discard_adds_tree(update);
- return ret;
+ goto error;
}
}
ret = zone_update_external(conf, update, &val);
if (ret != KNOT_EOK) {
discard_adds_tree(update);
- return ret;
+ goto error;
}
}
if (ret != KNOT_EOK) {
log_zone_error(update->zone->name, "failed to process catalog zone (%s)", knot_strerror(ret));
discard_adds_tree(update);
- return ret;
+ goto error;
}
ret = commit_redis(conf, update);
if (ret != KNOT_EOK) {
log_zone_error(update->zone->name, "zone database update failed (%s)", knot_strerror(ret));
discard_adds_tree(update);
- return ret;
+ goto error;
}
ret = commit_journal(conf, update);
if (ret != KNOT_EOK) {
log_zone_error(update->zone->name, "journal update failed (%s)", knot_strerror(ret));
discard_adds_tree(update);
- return ret;
+ goto error;
}
if (dnssec) {
memset(update, 0, sizeof(*update));
return KNOT_EOK;
+error:
+ ATOMIC_ADD(update->zone->server->stats.zone_update_error, 1);
+ return ret;
}
bool zone_update_no_change(zone_update_t *update)