diff options
author | Jan Hák <jan.hak@nic.cz> | 2024-11-08 14:06:26 +0100 |
---|---|---|
committer | Daniel Salzman <daniel.salzman@nic.cz> | 2024-11-18 15:55:49 +0100 |
commit | 556a19cf0727712830b7a0c16b2f22aa87c2ce6f (patch) | |
tree | 2dd4ea70442894e06f83c038627a4bc23f0fd508 /src | |
parent | doc/operation: mention the use of the force option for overwriting failed backup (diff) | |
download | knot-556a19cf0727712830b7a0c16b2f22aa87c2ce6f.tar.xz knot-556a19cf0727712830b7a0c16b2f22aa87c2ce6f.zip |
knotd: expiration aborts transaction in progress
Diffstat (limited to 'src')
-rw-r--r-- | src/knot/events/handlers/expire.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/knot/events/handlers/expire.c b/src/knot/events/handlers/expire.c index 5124e4acb..3e8b6f68b 100644 --- a/src/knot/events/handlers/expire.c +++ b/src/knot/events/handlers/expire.c @@ -1,4 +1,4 @@ -/* 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); |