From 69535e09732473fdffcdbc65cef7bc0525b39346 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 11 Apr 2022 12:14:50 +0200 Subject: [PATCH] daemon/zimport: close transaction after importing batch I'm really sorry about this. It's my regression in 5.5.0 (!1225) Practical consequence was that the RW transaction was held open until that instance did something with cache (and thus closed), so any other instance would be frozen in the meantime if doing anything non-read-only with cache (e.g. startup). https://lists.nic.cz/hyperkitty/list/knot-resolver-users@lists.nic.cz/thread/6DOXXOA6ACEUBVYPUY3T2MLGIHWOMV6M/ --- NEWS | 1 + daemon/zimport.c | 1 + 2 files changed, 2 insertions(+) diff --git a/NEWS b/NEWS index 4c42d5940..5de0829f1 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ Bugfixes -------- - modules/dns64: fix incorrect packet writes for cached packets (#727, !1275) - xdp: make it work also with libknot 3.1 (#735, !1276) +- prefill module: fix lockup when starting multiple idle instances (!1285) Knot Resolver 5.5.0 (2022-03-15) diff --git a/daemon/zimport.c b/daemon/zimport.c index 6bea6811f..a523a64f9 100644 --- a/daemon/zimport.c +++ b/daemon/zimport.c @@ -426,6 +426,7 @@ static void zi_zone_process(uv_timer_t *timer) kr_timer_start(&stopwatch); int ret = trie_apply(z_import->rrsets, zi_rrset_import, z_import); + (void)kr_cache_commit(&the_worker->engine->resolver.cache); // RW transaction open if (ret == 0) { kr_log_info(PREFILL, "performance: validating and caching took %.3lf s\n", kr_timer_elapsed(&stopwatch)); -- 2.47.2