-
Notifications
You must be signed in to change notification settings - Fork 404
req_fsm: Always run vcl_synth upon client req reset #4412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -560,13 +560,16 @@ req_poll(struct worker *wrk, struct req *req) | |
| { | ||
| struct req *top; | ||
|
|
||
| /* NB: Since a fail transition leads to vcl_synth, the request may be | ||
| * short-circuited twice. | ||
| /* If the req_reset flag was raised without taking the emulated | ||
| * return(fail) transition, there must be a good reason for that. | ||
| * One is that sub vcl_recv is always followed by a call to sub | ||
| * vcl_hash to always compute a cache key. The other one is that | ||
| * we always want to run sub vcl_synth for return(fail) even if | ||
| * we won't deliver the response, and maybe sub vcl_synth needs | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not understand this. The only place where Also, is I do not want to say that this is wrong, but could you please at least explain more?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The The goal is to ensure that this short circuit either emulates a
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not understand how your response would answer my questions.
Side note: We should base our design decisions on what we have in our code base. What is in your private fork should not guide us. |
||
| * the cache key. There may be other good reasons to proceed. | ||
| */ | ||
| if (req->req_reset) { | ||
| wrk->vpi->handling = VCL_RET_FAIL; | ||
| return (-1); | ||
| } | ||
| if (req->req_reset) | ||
| return (0); | ||
|
|
||
| top = req->top->topreq; | ||
| CHECK_OBJ_NOTNULL(top, REQ_MAGIC); | ||
|
|
@@ -581,8 +584,12 @@ req_poll(struct worker *wrk, struct req *req) | |
|
|
||
| VSLb_ts_req(req, "Reset", W_TIM_real(wrk)); | ||
| wrk->stats->req_reset++; | ||
| wrk->vpi->handling = VCL_RET_FAIL; | ||
| req->req_reset = 1; | ||
|
|
||
| if (req->req_step == R_STP_SYNTH) | ||
| return (0); | ||
|
|
||
| wrk->vpi->handling = VCL_RET_FAIL; | ||
| return (-1); | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the commit message sounds like there would be more to it, but this is really just a comment fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this describes the old waiting list system with the retired
hash_objheadfield. I noticed this while surveying thereq_resetbehavior because we have more waiting list features on the Enterprise side (primarily #3835).There was no reason to omit it from this patch series.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was really only asking because the commit message " req_fsm: Clear stale reference to req->hash_objhead" sounds like you had other intentions than only polishing a comment.