Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hotfix(metrics) cleanup old metrics shm during SIGHUP reallocation
In `ngx_init_cycle`, this section does a cleanup of `old_cycle` shms: /* close and delete stuff that lefts from an old cycle */ /* free the unnecessary shared memory */ ... Prior to this change, old metrics shms would be marked for reuse (i.e. `noreuse == 0`) and thus not freed. The change makes it so we hit the `ngx_init_cycle` line below: ngx_shm_free(&oshm_zone[i].shm); The `metrics->shm_zone->noreuse` flag is still set on the new shm after a SIGHUP/realloc, but at this point it has no effect on the new shm.
- Loading branch information