Commit 8e8e7896 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

hash: Apply OC_F_DYING to purged objects

All paths to EXP_Remove() raise the OC_F_DYING flag to dismiss the
objcore in HSH_Lookup(). A regular purge used to EXP_Rearm() an oc
for immediate (yet delayed) expiry, leaving it to the expiry thread
to apply this flag and call EXP_Remove().

When the regular purge went from EXP_Rearm() to EXP_Remove() in order
to avoid counting purged objects as expired, the OC_F_DYING flag was
overlooked.

Refs 709f71ab
parent 1ae70295
......@@ -718,6 +718,8 @@ HSH_Purge(struct worker *wrk, struct objhead *oh, vtim_real ttl_now,
}
if (oc->flags & OC_F_DYING)
continue;
if (is_purge)
oc->flags |= OC_F_DYING;
oc->refcnt++;
ocp[n++] = oc;
}
......
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