summaryrefslogtreecommitdiffstats
path: root/modules/policy/policy.lua
diff options
context:
space:
mode:
authorVladimír Čunát <vladimir.cunat@nic.cz>2022-12-05 14:38:45 +0100
committerVladimír Čunát <vladimir.cunat@nic.cz>2022-12-05 14:45:02 +0100
commit625b8d621fe5ae7e4486225f7360e9dbb0f66509 (patch)
tree73c4f13863410fc2d31cfd0570b6dc756937dc7a /modules/policy/policy.lua
parentMerge !1353: add option to link sbin/kresd to jemalloc (diff)
downloadknot-resolver-625b8d621fe5ae7e4486225f7360e9dbb0f66509.tar.xz
knot-resolver-625b8d621fe5ae7e4486225f7360e9dbb0f66509.zip
policy.DEBUG_IF: don't trigger .REQTRACE unconditionally
I broke this in 54ab3f78 or closely around, so this never worked well since 5.4.1, and maybe structured logging (5.4.0) had related issues.
Diffstat (limited to '')
-rw-r--r--modules/policy/policy.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/policy/policy.lua b/modules/policy/policy.lua
index 4eba7494..47e436f0 100644
--- a/modules/policy/policy.lua
+++ b/modules/policy/policy.lua
@@ -781,6 +781,7 @@ function policy.DEBUG_IF(test)
local debug_finish_cb = ffi.cast('trace_callback_f', function (cbreq)
jit.off(true, true) -- JIT for (C -> lua)^2 nesting isn't allowed
if test(cbreq) then
+ policy.REQTRACE(nil, cbreq)
debug_logfinish_cb(cbreq) -- unconditional version
local stash = cbreq:vars()['policy_debug_stash']
@@ -797,7 +798,6 @@ function policy.DEBUG_IF(test)
req:vars()['policy_debug_stash'] = {}
policy.QTRACE(state, req)
req:trace_chain_callbacks(debug_stashlog_cb, debug_finish_cb)
- policy.REQTRACE(state, req)
return
end
end