Commit 525ff0e7 authored by Nils Goroll's avatar Nils Goroll

cleanup implicit rollback for return(vcl(...))

VCC generates a call to VPI_vcl_select() before returning to the fsm. We
basically conducted half a rollback in VPI_vcl_slect and a rull rollback
in the fsm.

De-duplicate this dance and assert in the fsm that our request looks
rolled back.
parent fd7c8bfc
......@@ -879,7 +879,8 @@ cnt_recv(struct worker *wrk, struct req *req)
VCL_recv_method(req->vcl, wrk, req, NULL, NULL);
if (wrk->handling == VCL_RET_VCL && req->restarts == 0) {
Req_Rollback(req);
// Req_Rollback has happened in VPI_vcl_select
assert(WS_Snapshot(req->ws) == req->ws_req);
cnt_recv_prep(req, ci);
VCL_recv_method(req->vcl, wrk, req, NULL, NULL);
}
......
......@@ -99,12 +99,8 @@ VPI_vcl_select(VRT_CTX, VCL_VCL vcl)
if (! IS_TOPREQ(req))
assert(req->vcl == req->top->vcl0);
/* XXX VCL_Task* are somewhat duplicated to those in Req_Rollback called
* from FSM for VCL_RET_VCL. Keeping them here to ensure there are no
* tasks during calls to VCL_Rel / vcl_get
*/
VCL_TaskLeave(req->top->privs);
VCL_TaskLeave(req->privs);
Req_Rollback(req);
if (IS_TOPREQ(req)) {
AN(req->top);
AZ(req->top->vcl0);
......@@ -116,6 +112,4 @@ VPI_vcl_select(VRT_CTX, VCL_VCL vcl)
vcl_get(&req->vcl, vcl);
VSLb(ctx->req->vsl, SLT_VCL_use, "%s via %s",
req->vcl->loaded_name, vcl->loaded_name);
VCL_TaskEnter(req->privs);
VCL_TaskEnter(req->top->privs);
}
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