Skip to content
Snippets Groups Projects

Zone expiration aborts transaction in progress

Merged Jan Hák requested to merge expire_abort_transaction into master
1 unresolved thread
Files
3
/* Copyright (C) 2022 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
/* Copyright (C) 2024 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,6 +32,11 @@ int event_expire(conf_t *conf, zone_t *zone)
log_zone_info(zone->name, "zone expired");
synchronize_rcu();
pthread_mutex_lock(&zone->cu_lock);
zone_control_clear(zone);
pthread_mutex_unlock(&zone->cu_lock);
knot_sem_wait(&zone->cow_lock);
zone_contents_deep_free(expired);
knot_sem_post(&zone->cow_lock);
Loading