return ret;
}
+ zone_set_flag(zone, ZONE_USER_FLUSH);
if (ctl_has_flag(args->data[KNOT_CTL_IDX_FLAGS], CTL_FLAG_FORCE)) {
zone_set_flag(zone, ZONE_FORCE_FLUSH);
}
zone_journal_t j = zone_journal(zone);
bool force = zone_get_flag(zone, ZONE_FORCE_FLUSH, true);
+ bool user_flush = zone_get_flag(zone, ZONE_USER_FLUSH, true);
conf_val_t val = conf_zone_get(conf, C_ZONEFILE_SYNC, zone->name);
int64_t sync_timeout = conf_int(&val);
/* Check for updated zone. */
zone_contents_t *contents = zone->contents;
uint32_t serial_to = zone_contents_serial(contents);
- if (!force && zone->zonefile.exists && zone->zonefile.serial == serial_to &&
+ if (!force && !user_flush &&
+ zone->zonefile.exists && zone->zonefile.serial == serial_to &&
!zone->zonefile.retransfer && !zone->zonefile.resigned) {
ret = KNOT_EOK; /* No differences. */
goto flush_journal_replan;
ZONE_IS_CATALOG = 1 << 5, /*!< This is a catalog. */
ZONE_IS_CAT_MEMBER = 1 << 6, /*!< This zone exists according to a catalog. */
ZONE_XFR_FROZEN = 1 << 7, /*!< Outgoing AXFR/IXFR temporarily disabled. */
+ ZONE_USER_FLUSH = 1 << 8, /*!< User-triggered flush. */
} zone_flag_t;
/*!