Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-cluster
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-cluster
Commits
278c5746
Commit
278c5746
authored
Jul 30, 2018
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix inconsistency with .backend() arguments affecting state
parent
6496bf75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
vmod_cluster.c
src/vmod_cluster.c
+3
-3
vmod_cluster.vcc
src/vmod_cluster.vcc
+14
-9
No files found.
src/vmod_cluster.c
View file @
278c5746
...
...
@@ -482,8 +482,8 @@ vmod_cluster_backend(VRT_CTX,
if
(
resolve
==
LAZY
&&
(
ctx
->
method
&
cluster_methods
)
==
0
)
{
VRT_fail
(
ctx
,
"cluster.backend(resolve=
LAZY
)"
" can not be called here"
);
VRT_fail
(
ctx
,
"cluster.backend(resolve=
%s
)"
" can not be called here"
,
arg
->
resolve
);
return
NULL
;
}
...
...
@@ -493,7 +493,7 @@ vmod_cluster_backend(VRT_CTX,
char
pstk
[
param_sz
(
pr
,
pr
->
nblack
+
1
)];
nblack
=
pr
->
nblack
;
if
(
resolve
==
SHALLOW
||
resolve
==
DEEP
)
if
(
(
ctx
->
method
&
cluster_methods
)
==
0
)
spc
=
pstk
;
if
(
arg
->
valid_deny
&&
arg
->
deny
!=
NULL
&&
...
...
src/vmod_cluster.vcc
View file @
278c5746
...
...
@@ -183,22 +183,27 @@ documentation:
backend
* for ``resolve=DEEP`` the actual backend which the `cluster` or
`real`backend resolve to. Only differs from ``resolve=SHALLOW`` for
`real`
backend resolve to. Only differs from ``resolve=SHALLOW`` for
director backends.
``resolve=NOW`` is identical to ``resolve=DEEP`` as a transitional
interface and will be removed in a future version.
The optional `deny`, `real` and `uncacheable_direct` arguments have
the same effect as calling the methods :ref:`func_cluster.deny`,
:ref:`func_cluster.set_real` and
:ref:`func_cluster.set_uncacheable_direct` before the `.backend()`
method with ``resolve=LAZY``.
The optional `deny`, `real` and `uncacheable_direct` arguments behave
differently depending on context:
Use of these arguments with ``resolve=LAZY`` is only allowed in
``vcl_backend_fetch {}`` and ``vcl_init {}``.
* in ``vcl_backend_fetch {}`` and ``vcl_init {}``, they have the same
effect as calling the methods :ref:`func_cluster.deny`,
:ref:`func_cluster.set_real` and
:ref:`func_cluster.set_uncacheable_direct` before the `.backend()`
method - in other words, they affect future method calls on the same
cluster object also.
Calling with ``resolve=DEEP`` and ``resolve=SHALLOW`` is valid anywhere.
* Outside ``vcl_backend_fetch {}`` and ``vcl_init {}``, the `deny`,
`real` and `uncacheable_direct` arguments only affect the current
return value.
Also, they cannot be used together with ``resolve=LAZY``.
SEE ALSO
========
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment