[6.0] 3bb4686b0 merge HSH_EXP and HSH_EXPBUSY into HSH_GRACE
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Fri Feb 8 13:13:09 UTC 2019
commit 3bb4686b07d5a52c24ca9c887caf6ed536c9f01d
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Dec 3 21:17:05 2018 +0100
merge HSH_EXP and HSH_EXPBUSY into HSH_GRACE
they are the same case
diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index f8029cb98..4ee3dbce6 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -496,7 +496,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
} else {
if (exp_oc->hits < LONG_MAX)
exp_oc->hits++;
- retval = HSH_EXPBUSY;
+ retval = HSH_GRACE;
}
} else {
Lck_Unlock(&oh->mtx);
@@ -518,7 +518,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
assert(HSH_DerefObjHead(wrk, &oh));
if (exp_oc->hits < LONG_MAX)
exp_oc->hits++;
- return (HSH_EXP);
+ return (HSH_GRACE);
}
/* There are one or more busy objects, wait for them */
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index cafdd010f..65c90e6b7 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -556,7 +556,7 @@ cnt_lookup(struct worker *wrk, struct req *req)
}
wrk->stats->cache_hit++;
req->is_hit = 1;
- if (lr == HSH_EXP || lr == HSH_EXPBUSY)
+ if (lr == HSH_GRACE)
wrk->stats->cache_hit_grace++;
req->req_step = R_STP_DELIVER;
return (REQ_FSM_MORE);
diff --git a/bin/varnishd/hash/hash_slinger.h b/bin/varnishd/hash/hash_slinger.h
index d6cad78ae..aa4f284f4 100644
--- a/bin/varnishd/hash/hash_slinger.h
+++ b/bin/varnishd/hash/hash_slinger.h
@@ -53,8 +53,7 @@ enum lookup_e {
HSH_MISS,
HSH_BUSY,
HSH_HIT,
- HSH_EXP,
- HSH_EXPBUSY
+ HSH_GRACE
};
/* mgt_hash.c */
More information about the varnish-commit
mailing list