Skip to content
Snippets Groups Projects
Commit 4590f689 authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman
Browse files

notify/retry: use SOA retry for NOTIFY retry interval

parent 5b6ed759
Branches
Tags
1 merge request!1443notify/retry
......@@ -195,7 +195,14 @@ int event_notify(conf_t *conf, zone_t *zone)
if (failed) {
notifailed_rmt_dynarray_sort_dedup(&zone->notifailed);
zone_events_schedule_at(zone, ZONE_EVENT_NOTIFY, time(NULL) + 10); // FIXME exponential backoff of NOTIFY retries
uint32_t retry_in = knot_soa_retry(soa.rrs.rdata);
conf_val_t val = conf_zone_get(conf, C_RETRY_MIN_INTERVAL, zone->name);
retry_in = MAX(retry_in, conf_int(&val));
val = conf_zone_get(conf, C_RETRY_MAX_INTERVAL, zone->name);
retry_in = MIN(retry_in, conf_int(&val));
zone_events_schedule_at(zone, ZONE_EVENT_NOTIFY, time(NULL) + retry_in);
}
return failed ? KNOT_ERROR : KNOT_EOK;
......
......@@ -17,6 +17,8 @@ t.link(zone, master, slave1)
t.link(zone, master, slave2)
t.link(zone, master, slave3)
master.zones[zone[0].name].retry_max = 10
t.start()
serial = master.zone_wait(zone)
......
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