]> git.kaiwu.me - njs.git/commit
Modules: initialize shared dict state entry expiration
authorDmitry Volyntsev <xeioex@nginx.com>
Sat, 10 Oct 2026 01:36:20 +0000 (18:36 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Thu, 15 Oct 2026 01:49:05 +0000 (18:49 -0700)
commit1fdfec8ecfe89b6ed852f9c18a859d3e8bec4b4b
treeecb3980a15056fd6cc1e7d3a85362de0192927a2
parent571a324b20a4b24f5679344a72d97ff0e355098d
Modules: initialize shared dict state entry expiration

When a shared dict state entry omits the optional expire field, its
expiration remains uninitialized.  In a zone with timeout=, the entry
can be discarded as expired or loaded with an arbitrary expiration
instead of receiving the zone timeout.

Initialize expiration to zero before parsing the entry so an omitted
expire field is treated like an explicit zero.  The entry then receives
the zone timeout and the state file is scheduled for saving.
nginx/ngx_js_shared_dict.c
nginx/t/js_shared_dict_state_timeout.t