]> git.kaiwu.me - njs.git/commit
Modules: fix shared dict state save error ordering
authorDmitry Volyntsev <xeioex@nginx.com>
Sat, 10 Oct 2026 01:03:47 +0000 (18:03 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Thu, 15 Oct 2026 01:49:05 +0000 (18:49 -0700)
commit903748497809ea97011ff22a7aa09320d7c1b08c
tree02f1ba2afd2366bf6291cd3bebf657329bff7b4b
parente374b09eb0e9139eae4ffcebd806f269d92b4d37
Modules: fix shared dict state save error ordering

On save failure, writing is cleared before dirty is restored.  Another
worker can observe a clean, idle zone and stop retrying.  If the failed
writer is exiting, it also stops retrying and the changes remain unsaved.

Set dirty first and add a memory barrier before clearing writing to
publish the need for another save before releasing the writer.
nginx/ngx_js_shared_dict.c