[PATCH 8 of 9] Upstream: disable re-resolve functionality on Windows
Aleksei Bavshin
a.bavshin at nginx.com
Thu Jun 13 22:29:03 UTC 2024
# HG changeset patch
# User Aleksei Bavshin <a.bavshin at nginx.com>
# Date 1712181327 25200
# Wed Apr 03 14:55:27 2024 -0700
# Node ID 375fa42f1a6010692a8782c4f03c6ad465d3f7f7
# Parent 8c8d8118c7ac0a0426f48dbfed94e279dddff992
Upstream: disable re-resolve functionality on Windows.
Following features are currently not implemented on Windows, making re-resolve
functionality unsafe to use:
* 'noreuse' shared zones that are re-created on each configuration reload.
The work scheduling logic is not prepared to handle simultaneous access to
the shared zone from multiple generations of the worker processes.
* 'ngx_worker' identification.
It is possible to configure multiple worker processes on Windows, even if
only one would actually handle the traffic. All of the worker processes are
currently identified as process 0, breaking scheduling and locking of the
resolver tasks.
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -6327,7 +6327,7 @@ ngx_http_upstream_server(ngx_conf_t *cf,
continue;
}
-#if (NGX_HTTP_UPSTREAM_ZONE)
+#if (NGX_HTTP_UPSTREAM_ZONE && !(NGX_WIN32))
if (ngx_strcmp(value[i].data, "resolve") == 0) {
resolve = 1;
continue;
diff --git a/src/stream/ngx_stream_upstream.c b/src/stream/ngx_stream_upstream.c
--- a/src/stream/ngx_stream_upstream.c
+++ b/src/stream/ngx_stream_upstream.c
@@ -545,7 +545,7 @@ ngx_stream_upstream_server(ngx_conf_t *c
continue;
}
-#if (NGX_STREAM_UPSTREAM_ZONE)
+#if (NGX_STREAM_UPSTREAM_ZONE && !(NGX_WIN32))
if (ngx_strcmp(value[i].data, "resolve") == 0) {
resolve = 1;
continue;
More information about the nginx-devel
mailing list