<div dir="ltr">[ And now replying to all.. ]<br><br><div><span style="font-size:12.8px">Hi,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">If setting or using a storage cannot fail I'd say kill _hint (eventually) and just use storage.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">If there is a chance of failing, I'd keep the _hint. I'd avoid having both. Having backend_hint and backend is confusing enough already.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Regardless of the outcome, I think we should be more explicit on how tell tell Varnish any storage (or the next storage for the matter) is OK.</div><div style="font-size:12.8px">Right now this happens under the hood and I've seen people setting the wrong storage by mistake (typos), not realising it and asking why Transient or some other storage is full.<br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Best.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 10, 2016 at 1:30 PM, Dridi Boukelmoune <span dir="ltr"><<a href="mailto:dridi@varni.sh" target="_blank">dridi@varni.sh</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
Following discussions on storage/stevedore literals vs hints in VCL<br>
I've tried to sum up the current situation and suggest a direction to<br>
take.<br>
<br>
Currently we have:<br>
<br>
1) a STEVEDORE type for VCL (storage namespace)<br>
2) all storages resolved at boot time (typesafe)<br>
3) beresp.storage_hint takes a STRING<br>
4) no/wrong hint means round-robin among storages<br>
<br>
Today during the bugwash, following two pull requests introducing a<br>
storage hint for the request body (instead of systematically using<br>
Transient) we discussed the possibility of removing the hint part. The<br>
reason being 1) in the list above.<br>
<br>
After some testing on master, it doesn't seem to be enforced:<br>
<br>
    sub vcl_backend_response {<br>
        set beresp.storage_hint = "some random junk";<br>
        set beresp.storage_hint = beresp.http.x-storage;<br>
    }<br>
<br>
However, implicit stevedore conversion to string exists:<br>
<br>
    sub vcl_backend_response {<br>
        set beresp.storage_hint = storage.Transient;<br>
    }<br>
<br>
Suggestions:<br>
<br>
A) Keep the _hint to allow backend- or vmod-driven _loose_ storage<br>
   selection.<br>
<br>
B) Maybe introduce besresp.storage to avoid conversions to and from<br>
   STRING, but allow NULL to behave the same as 4) for the _hint.<br>
<br>
C) Be consistent when storage selection is introduced for the request body.<br>
<br>
Cheers,<br>
Dridi<br>
<br>
______________________________<wbr>_________________<br>
varnish-dev mailing list<br>
<a href="mailto:varnish-dev@varnish-cache.org">varnish-dev@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev" rel="noreferrer" target="_blank">https://www.varnish-cache.org/<wbr>lists/mailman/listinfo/<wbr>varnish-dev</a><br>
</blockquote></div><br></div>