fellow_cache: Add a counter for object errors after the initial read

parent 05c987cb
...@@ -67,6 +67,18 @@ ...@@ -67,6 +67,18 @@
Number of times a disk object (vampireobject) was accessed and Number of times a disk object (vampireobject) was accessed and
a get operation was already in progress a get operation was already in progress
.. varnish_vsc:: c_mem_obj_fail
:type: counter
:level: info
:oneliner: A memory object failed
Number of times a failed memory object is encountered. This is
most likely because some IO failed after the intial creation
of the in memory object. This could be a disk write error or a
read error of segments or segment lists.
Details are logged as ``SLT_Error`` to *vsl(7)*.
.. varnish_vsc:: c_mem_obj_free .. varnish_vsc:: c_mem_obj_free
:type: counter :type: counter
:level: info :level: info
......
...@@ -660,11 +660,14 @@ sfedsk_objslim(struct worker *wrk, struct objcore *dskoc) ...@@ -660,11 +660,14 @@ sfedsk_objslim(struct worker *wrk, struct objcore *dskoc)
/* handle fellow_cache_res for iterators */ /* handle fellow_cache_res for iterators */
static int static int
stvfe_fcr_handle_iter(struct worker *wrk, struct objcore *oc, stvfe_fcr_handle_iter(struct worker *wrk, struct objcore *oc,
const struct stevedore *stv, struct fellow_cache_res fcr) const struct stevedore *stv, const struct stvfe *stvfe,
struct fellow_cache_res fcr)
{ {
if (fcr.status == fcr_ok) if (fcr.status == fcr_ok)
return (fcr.r.integer); return (fcr.r.integer);
stvfe->stats->c_mem_obj_fail++;
VSLb(wrk->vsl, SLT_Error, "%s %s %s: %s", VSLb(wrk->vsl, SLT_Error, "%s %s %s: %s",
stv->name, stv->ident, stv->name, stv->ident,
fellow_cache_res_s[fcr.status], fellow_cache_res_s[fcr.status],
...@@ -830,7 +833,7 @@ sfemem_iterator(struct worker *wrk, struct objcore *oc, ...@@ -830,7 +833,7 @@ sfemem_iterator(struct worker *wrk, struct objcore *oc,
VC4013_INIT(wrk, oc); VC4013_INIT(wrk, oc);
fcr = fellow_cache_obj_iter(stvfe->fc, fco, priv, func, final); fcr = fellow_cache_obj_iter(stvfe->fc, fco, priv, func, final);
VC4013_FINI(); VC4013_FINI();
return (stvfe_fcr_handle_iter(wrk, oc, stv, fcr)); return (stvfe_fcr_handle_iter(wrk, oc, stv, stvfe, fcr));
} }
INIT_OBJ(&fs, FELLOW_STREAM_MAGIC); INIT_OBJ(&fs, FELLOW_STREAM_MAGIC);
...@@ -855,7 +858,7 @@ sfemem_iterator(struct worker *wrk, struct objcore *oc, ...@@ -855,7 +858,7 @@ sfemem_iterator(struct worker *wrk, struct objcore *oc,
fcr = fellow_cache_obj_iter(stvfe->fc, fco, fcr = fellow_cache_obj_iter(stvfe->fc, fco,
&fs, fellow_stream_f, final); &fs, fellow_stream_f, final);
ret = stvfe_fcr_handle_iter(wrk, oc, stv, fcr); ret = stvfe_fcr_handle_iter(wrk, oc, stv, stvfe, fcr);
out: out:
HSH_DerefBoc(wrk, oc); HSH_DerefBoc(wrk, oc);
...@@ -880,7 +883,7 @@ sfedsk_iterator(struct worker *wrk, struct objcore *dskoc, ...@@ -880,7 +883,7 @@ sfedsk_iterator(struct worker *wrk, struct objcore *dskoc,
fcr = fellow_cache_obj_iter(stvfe->fc, fcoc.fco, priv, func, final); fcr = fellow_cache_obj_iter(stvfe->fc, fcoc.fco, priv, func, final);
VC4013_FINI(); VC4013_FINI();
fcoc_fini(stvfe->fc, &fcoc); fcoc_fini(stvfe->fc, &fcoc);
return (stvfe_fcr_handle_iter(wrk, dskoc, stv, fcr)); return (stvfe_fcr_handle_iter(wrk, dskoc, stv, stvfe, fcr));
} }
static inline struct fellow_busy * static inline struct fellow_busy *
......
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