From 57fada3b0d47ed448f1b56e666edf3c3a21967fd Mon Sep 17 00:00:00 2001 From: JianFeeeee Date: Sun, 11 Oct 2026 12:14:49 +0800 Subject: [PATCH] =?UTF-8?q?docs(lua):=20=E6=9B=B4=E6=AD=A3=20ScheduledTask?= =?UTF-8?q?.Timeout=20=E6=B3=A8=E9=87=8A=20=E2=80=94=E2=80=94=20=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E7=94=B1=E6=8A=9B=E5=BC=83=20generation=20=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=EF=BC=8C=E9=9D=9E=20Lua=20=E6=8C=87=E4=BB=A4=E7=BA=A7?= =?UTF-8?q?=E4=B8=AD=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/lua/plugin_runtime.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/lua/plugin_runtime.go b/internal/lua/plugin_runtime.go index 382fd5e..7a8ded2 100644 --- a/internal/lua/plugin_runtime.go +++ b/internal/lua/plugin_runtime.go @@ -53,8 +53,10 @@ type ScheduledTask struct { // many replicas) do not all hit the same upstream at :00. Jitter int `json:"jitter,omitempty"` // Timeout, in seconds, bounds one execution. 0 uses defaultTaskTimeout. - // A task that exceeds it is interrupted at the Lua instruction level — the - // only way to stop a runaway script on the C stack. + // NOTE: a running Lua call CANNOT be interrupted in this LuaJIT build (see + // the capability note in checkWedged). The timeout is therefore enforced at + // the generation level — a task that overruns wedgedAfter has its whole VM + // abandoned — not by stopping the script mid-instruction. Timeout int `json:"timeout,omitempty"` }