]> git.kaiwu.me - njs.git/commit
Modules: fixed expire field truncation in shared dict state files.
authorDmitry Volyntsev <xeioex@nginx.com>
Fri, 20 Feb 2026 23:45:25 +0000 (15:45 -0800)
committerDmitry Volyntsev <xeioexception@gmail.com>
Tue, 24 Feb 2026 21:30:50 +0000 (13:30 -0800)
commit62881dc4afd5f6998dcc04205f1d51eee67121dc
tree6ccdd725ecf734ffc1ca40d10c2bfcf29cb70a01
parent433478d5ecb4b1976e0291347a16eee8d75f70ad
Modules: fixed expire field truncation in shared dict state files.

The njs_sprintf buffer for the expire field was sized for 10-digit
numbers, but current millisecond timestamps are 13 digits. This caused
silent truncation, making entries appear expired on a full restart.

The issue has been present since eca03622 (0.9.1), which introduced
the shared dictionary state file support.
nginx/ngx_js_shared_dict.c
nginx/t/js_shared_dict_state.t
nginx/t/js_shared_dict_state_timeout.t [new file with mode: 0644]