Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
3c0609bc
Unverified
Commit
3c0609bc
authored
Jun 10, 2020
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shard signedness stir: last bits?
parent
90c5be03
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
shard_dir.c
lib/libvmod_directors/shard_dir.c
+3
-4
vmod_shard.c
lib/libvmod_directors/vmod_shard.c
+2
-2
No files found.
lib/libvmod_directors/shard_dir.c
View file @
3c0609bc
...
@@ -276,9 +276,8 @@ init_state(struct shard_state *state,
...
@@ -276,9 +276,8 @@ init_state(struct shard_state *state,
VCL_BOOL
VCL_BOOL
sharddir_any_healthy
(
VRT_CTX
,
struct
sharddir
*
shardd
,
VCL_TIME
*
changed
)
sharddir_any_healthy
(
VRT_CTX
,
struct
sharddir
*
shardd
,
VCL_TIME
*
changed
)
{
{
unsigned
retval
=
0
;
unsigned
i
,
retval
=
0
;
VCL_BACKEND
be
;
VCL_BACKEND
be
;
int
i
;
vtim_real
c
;
vtim_real
c
;
CHECK_OBJ_NOTNULL
(
shardd
,
SHARDDIR_MAGIC
);
CHECK_OBJ_NOTNULL
(
shardd
,
SHARDDIR_MAGIC
);
...
@@ -367,10 +366,10 @@ sharddir_pick_be_locked(VRT_CTX, const struct sharddir *shardd, uint32_t key,
...
@@ -367,10 +366,10 @@ sharddir_pick_be_locked(VRT_CTX, const struct sharddir *shardd, uint32_t key,
chosen_r
=
shardcfg_get_rampup
(
shardd
,
state
->
previous
.
hostid
);
chosen_r
=
shardcfg_get_rampup
(
shardd
,
state
->
previous
.
hostid
);
alt_r
=
shardcfg_get_rampup
(
shardd
,
state
->
last
.
hostid
);
alt_r
=
shardcfg_get_rampup
(
shardd
,
state
->
last
.
hostid
);
SHDBG
(
SHDBG_RAMPWARM
,
shardd
,
"chosen host %
d
rampup %f changed %f"
,
SHDBG
(
SHDBG_RAMPWARM
,
shardd
,
"chosen host %
u
rampup %f changed %f"
,
state
->
previous
.
hostid
,
chosen_r
,
state
->
previous
.
hostid
,
chosen_r
,
ctx
->
now
-
state
->
previous
.
changed
);
ctx
->
now
-
state
->
previous
.
changed
);
SHDBG
(
SHDBG_RAMPWARM
,
shardd
,
"alt host %
d
rampup %f changed %f"
,
SHDBG
(
SHDBG_RAMPWARM
,
shardd
,
"alt host %
u
rampup %f changed %f"
,
state
->
last
.
hostid
,
alt_r
,
state
->
last
.
hostid
,
alt_r
,
ctx
->
now
-
state
->
last
.
changed
);
ctx
->
now
-
state
->
last
.
changed
);
...
...
lib/libvmod_directors/vmod_shard.c
View file @
3c0609bc
...
@@ -800,10 +800,10 @@ vmod_shard_list(VRT_CTX, VCL_BACKEND dir, struct vsb *vsb, int pflag, int jflag)
...
@@ -800,10 +800,10 @@ vmod_shard_list(VRT_CTX, VCL_BACKEND dir, struct vsb *vsb, int pflag, int jflag)
return
;
return
;
if
(
jflag
)
if
(
jflag
)
VSB_printf
(
vsb
,
"[%u, %
d
,
\"
%s
\"
]"
,
nh
,
i
,
VSB_printf
(
vsb
,
"[%u, %
u
,
\"
%s
\"
]"
,
nh
,
i
,
nh
?
"healthy"
:
"sick"
);
nh
?
"healthy"
:
"sick"
);
else
else
VSB_printf
(
vsb
,
"%u/%
d
\t
%s"
,
nh
,
i
,
nh
?
"healthy"
:
"sick"
);
VSB_printf
(
vsb
,
"%u/%
u
\t
%s"
,
nh
,
i
,
nh
?
"healthy"
:
"sick"
);
}
}
VCL_VOID
v_matchproto_
(
td_directors_shard_backend
)
VCL_VOID
v_matchproto_
(
td_directors_shard_backend
)
...
...
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