shard signedness stir: last bits?

parent 90c5be03
...@@ -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);
......
...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment