Commit 36cc6b64 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use the obj->entered timestamp when inserting into the expiry structures.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3179 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent f95017a4
......@@ -435,7 +435,7 @@ extern pthread_t cli_thread;
#define ASSERT_CLI() do {assert(pthread_self() == cli_thread);} while (0)
/* cache_expiry.c */
void EXP_Insert(struct object *o, double now);
void EXP_Insert(struct object *o);
void EXP_Init(void);
void EXP_Rearm(const struct object *o);
void EXP_Touch(const struct object *o, double now);
......
......@@ -434,8 +434,7 @@ cnt_fetch(struct sess *sp)
sp->obj->cacheable = 1;
if (sp->obj->objhead != NULL) {
VRY_Create(sp);
assert(!isnan(sp->wrk->used));
EXP_Insert(sp->obj, sp->wrk->used);
EXP_Insert(sp->obj);
HSH_Unbusy(sp);
}
sp->wrk->acct.fetch++;
......
......@@ -162,7 +162,7 @@ update_object_when(const struct object *o)
*/
void
EXP_Insert(struct object *o, double now)
EXP_Insert(struct object *o)
{
struct objexp *oe;
......@@ -173,7 +173,8 @@ EXP_Insert(struct object *o, double now)
add_objexp(o);
oe = o->objexp;
oe->lru_stamp = now;
assert(o->entered != 0 && !isnan(o->entered));
oe->lru_stamp = o->entered;
update_object_when(o);
LOCK(&exp_mtx);
binheap_insert(exp_heap, oe);
......
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