annotate src/http/modules/perl/Makefile.PL @ 8045:aa28c802409f

Resolver: make TCP write timer event cancelable. Similar to 70e65bf8dfd7, the change is made to ensure that the ability to cancel resolver tasks is fully controlled by the caller. As mentioned in the referenced commit, it is safe to make this timer cancelable because resolve tasks can have their own timeouts that are not cancelable. The scenario where this may become a problem is a periodic background resolve task (not tied to a specific request or a client connection), which receives a response with short TTL, large enough to warrant fallback to a TCP query. With each event loop wakeup, we either have a previously set write timer instance or schedule a new one. The non-cancelable write timer can delay or block graceful shutdown of a worker even if the ngx_resolver_ctx_t->cancelable flag is set by the API user, and there are no other tasks or connections. We use the resolver API in this way to maintain the list of upstream server addresses specified with the 'resolve' parameter, and there could be third-party modules implementing similar logic.
author Aleksei Bavshin <a.bavshin@f5.com>
date Wed, 01 Jun 2022 20:17:23 -0700
parents 0d2956dfc4e6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
599
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
2 # Copyright (C) Igor Sysoev
4412
d620f497c50f Copyright updated.
Maxim Konovalov <maxim@nginx.com>
parents: 681
diff changeset
3 # Copyright (C) Nginx, Inc.
599
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
4
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
5 use 5.006001;
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
6 use ExtUtils::MakeMaker;
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
7
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
8 WriteMakefile(
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
9 NAME => 'nginx',
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
10 VERSION_FROM => 'nginx.pm', # finds $VERSION
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
11 PREREQ_PM => {}, # e.g., Module::Name => 1.1
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
12
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
13 ABSTRACT_FROM => 'nginx.pm', # retrieve abstract from module
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
14 AUTHOR => 'Igor Sysoev',
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
15
681
7e24168b0853 nginx-0.4.0-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 619
diff changeset
16 CCFLAGS => "$ENV{NGX_PM_CFLAGS}",
619
7a16e281c01f nginx-0.3.31-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 599
diff changeset
17 OPTIMIZE => '-O',
599
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
18
6700
0d2956dfc4e6 Perl: pass additional linker options to perl module.
Konstantin Pavlov <thresh@nginx.com>
parents: 5180
diff changeset
19 LDDLFLAGS => "$ENV{NGX_PM_LDFLAGS}",
0d2956dfc4e6 Perl: pass additional linker options to perl module.
Konstantin Pavlov <thresh@nginx.com>
parents: 5180
diff changeset
20
4945
ae3ebf5ac8cd Fixed build with embedded perl in certain setups (ticket #48).
Ruslan Ermilov <ru@nginx.com>
parents: 4473
diff changeset
21 INC => join(" ", map {
ae3ebf5ac8cd Fixed build with embedded perl in certain setups (ticket #48).
Ruslan Ermilov <ru@nginx.com>
parents: 4473
diff changeset
22 m#^/# ? "-I $_" : "-I ../../../../../$_"
ae3ebf5ac8cd Fixed build with embedded perl in certain setups (ticket #48).
Ruslan Ermilov <ru@nginx.com>
parents: 4473
diff changeset
23 } (split /\s+/, $ENV{NGX_INCS})),
599
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
24
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
25 depend => {
5168
482fda984556 Configure: fixed nginx.so rebuild (broken by r5145).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4945
diff changeset
26 'nginx.c' => join(" ", map {
5180
2db6bdcaedc0 Configure: fixed perl Makefile generation (ticket #334).
Maxim Dounin <mdounin@mdounin.ru>
parents: 5168
diff changeset
27 m#^/# ? $_ : "../../../../../$_"
5168
482fda984556 Configure: fixed nginx.so rebuild (broken by r5145).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4945
diff changeset
28 } (split(/\s+/, $ENV{NGX_DEPS}),
482fda984556 Configure: fixed nginx.so rebuild (broken by r5145).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4945
diff changeset
29 "src/http/modules/perl/ngx_http_perl_module.h"))
599
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
30 },
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
31
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
32 PM => {
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
33 'nginx.pm' => '$(INST_LIBDIR)/nginx.pm'
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
34 }
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
35 );