Skip to content
Snippets Groups Projects
Commit d6711bff authored by Daniel Salzman's avatar Daniel Salzman
Browse files

Merge branch 'load_journal_simply' into 'master'

load: apply journal on zonefile whenever possible...

See merge request !1441
parents 71211c41 7698dd38
No related branches found
No related tags found
1 merge request!1441load: apply journal on zonefile whenever possible...
Pipeline #96315 passed
......@@ -91,9 +91,6 @@ int event_load(conf_t *conf, zone_t *zone)
struct timespec mtime;
char *filename = conf_zonefile(conf, zone->name);
ret = zonefile_exists(filename, &mtime);
bool zonefile_unchanged = (zone->zonefile.exists &&
zone->zonefile.mtime.tv_sec == mtime.tv_sec &&
zone->zonefile.mtime.tv_nsec == mtime.tv_nsec);
if (ret == KNOT_EOK) {
ret = zone_load_contents(conf, zone->name, &zf_conts, false);
}
......@@ -132,11 +129,7 @@ int event_load(conf_t *conf, zone_t *zone)
}
// If configured and appliable to zonefile, load journal changes.
bool journal_load_configured1 = (load_from == JOURNAL_CONTENT_CHANGES);
bool journal_load_configured2 = (load_from == JOURNAL_CONTENT_ALL);
if ((journal_load_configured1 || journal_load_configured2) &&
(!old_contents_exist || zonefile_unchanged)) {
if (load_from != JOURNAL_CONTENT_NONE) {
ret = zone_load_journal(conf, zone, zf_conts);
if (ret != KNOT_EOK) {
zone_contents_deep_free(zf_conts);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment