view auto/threads @ 8005:dd718d1cef3c

Cache: fixed race in ngx_http_file_cache_forced_expire(). During configuration reload two cache managers might exist for a short time. If both tried to delete the same cache node, the "ignore long locked inactive cache entry" alert appeared in logs. Additionally, ngx_http_file_cache_forced_expire() might be also called by worker processes, with similar results. Fix is to ignore cache nodes being deleted, similarly to how it is done in ngx_http_file_cache_expire() since 3755:76e3a93821b1. This was somehow missed in 7002:ab199f0eb8e8, when ignoring long locked cache entries was introduced in ngx_http_file_cache_forced_expire().
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 01 Feb 2022 16:29:28 +0300
parents 04ebf29eaf5b
children
line wrap: on
line source


# Copyright (C) Nginx, Inc.


if [ $USE_THREADS = YES ]; then

    if [ "$NGX_PLATFORM" = win32 ]; then
        cat << END

$0: --with-threads is not supported on Windows

END
        exit 1
    fi

    have=NGX_THREADS . auto/have
    CORE_DEPS="$CORE_DEPS $THREAD_POOL_DEPS"
    CORE_SRCS="$CORE_SRCS $THREAD_POOL_SRCS"
    CORE_LIBS="$CORE_LIBS -lpthread"
    NGX_LIBPTHREAD="-lpthread"
fi