Commit e1535c8d authored by Nils Goroll's avatar Nils Goroll

gc beresp.storage_hint

it was deprecated since varnish 5.1.

motivated by the bereq.retries cleanup, see #2405
parent 5b6377e3
......@@ -443,7 +443,6 @@ struct busyobj {
/* Acct */
struct acct_bereq acct;
const char *storage_hint;
const struct stevedore *storage;
const struct director *director_req;
const struct director *director_resp;
......
......@@ -63,7 +63,6 @@ vbf_allocobj(struct busyobj *bo, unsigned l)
stv = bo->storage;
bo->storage = NULL;
bo->storage_hint = NULL;
if (stv == NULL)
return (0);
......@@ -175,7 +174,6 @@ vbf_stp_mkbereq(struct worker *wrk, struct busyobj *bo)
assert(bo->fetch_objcore->boc->state == BOS_INVALID);
AZ(bo->storage);
AZ(bo->storage_hint);
HTTP_Setup(bo->bereq0, bo->ws, bo->vsl, SLT_BereqMethod);
http_FilterReq(bo->bereq0, bo->req->http,
......@@ -238,7 +236,6 @@ vbf_stp_retry(struct worker *wrk, struct busyobj *bo)
/* reset other bo attributes - See VBO_GetBusyObj */
bo->storage = NULL;
bo->storage_hint = NULL;
bo->do_esi = 0;
bo->do_stream = 1;
......@@ -264,7 +261,6 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
AZ(bo->storage);
AZ(bo->storage_hint);
bo->storage = STV_next();
......
......@@ -330,42 +330,6 @@ VRT_r_beresp_backend_ip(VRT_CTX)
/*--------------------------------------------------------------------*/
const char *
VRT_r_beresp_storage_hint(VRT_CTX)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(ctx->bo, BUSYOBJ_MAGIC);
if (ctx->bo->storage_hint != NULL)
return (ctx->bo->storage_hint);
else
return (NULL);
}
void
VRT_l_beresp_storage_hint(VRT_CTX, const char *str, ...)
{
const struct stevedore *stv;
va_list ap;
const char *b;
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(ctx->bo, BUSYOBJ_MAGIC);
va_start(ap, str);
b = VRT_String(ctx->bo->ws, NULL, str, ap); // XXX: ctx->ws ?
va_end(ap);
if (b == NULL) {
VSLb(ctx->vsl, SLT_LostHeader, "storage_hint");
WS_MarkOverflow(ctx->bo->beresp->ws);
return;
}
ctx->bo->storage_hint = b;
stv = STV_find(b);
if (stv != NULL)
ctx->bo->storage = stv;
}
/*--------------------------------------------------------------------*/
VCL_STEVEDORE
VRT_r_req_storage(VRT_CTX)
{
......
varnishtest "Stevedores RR, beresp.storage and beresp.storage_hint"
varnishtest "Stevedores RR, beresp.storage"
server s1 -repeat 6 {
rxreq
......@@ -12,10 +12,8 @@ varnish v1 \
-vcl+backend {
import vtc;
sub vcl_backend_response {
if (bereq.url == "/1") {
set beresp.storage_hint = "invalid";
} else if (bereq.url == "/2") {
set beresp.storage_hint = "s1";
if (bereq.url == "/2") {
set beresp.storage = storage.s1;
} else if (bereq.url == "/6") {
set beresp.storage = vtc.no_stevedore();
}
......
......@@ -43,7 +43,6 @@ varnish v1 -arg "-i J.F.Nobody" -vcl+backend {
set beresp.http.beresp_backend = beresp.backend;
set beresp.http.keep = beresp.keep;
set beresp.http.stv = beresp.storage;
set beresp.http.hint = beresp.storage_hint;
set beresp.http.be_ip = beresp.backend.ip;
set beresp.http.be_nm = beresp.backend.name;
set beresp.http.unc = bereq.uncacheable;
......
......@@ -41,6 +41,8 @@ VCL
``req.hash_always_miss`` are now accessible from all of the client
side subs, not just ``vcl_recv{}``
* Removed ``beresp.storage_hint`` (was deprecated since Varnish 5.1)
C APIs (for vmod and utility authors)
-------------------------------------
......
......@@ -670,15 +670,6 @@ sp_variables = [
The storage backend to use to save this object.
"""
),
('beresp.storage_hint',
'STRING',
('backend_response', 'backend_error'),
('backend_response', 'backend_error'), """
Deprecated. Hint to Varnish that you want to
save this object to a particular storage backend.
Use beresp.storage instead.
"""
),
('obj.proto',
'STRING',
('hit',),
......
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