-
Notifications
You must be signed in to change notification settings - Fork 400
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?
Conversation
This way it becomes possible to log extra information for log consumers, call into VMODs, or whatever else one might want to do for a synthetic 408 response.
| * worker thread. We return to STP_LOOKUP when the busy | ||
| * object has been unbusied, and still have the objhead | ||
| * around to restart the lookup with. | ||
| * worker thread. We return to R_STP_LOOKUP, with the |
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_objhead field. I noticed this while surveying the req_reset behavior 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.
| * 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 |
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 do not understand this. The only place where req_reset is set, VCL_RET_FAIL handling is signaled. Why does this pivot around req_reset and not VCL_RET_FAIL as already seems to be the case?
Also, is vcl_synth{} still the right place for this? Do we need some place to handle VCL_RET_FAIL, where it is clear that we do not emit headers?
I do not want to say that this is wrong, but could you please at least explain more?
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 req_poll() function is a short-circuit to circumvent VCL execution once a request is "reset". For now, that is limited to aborted h2 connections or h2 streams being reset (and again, #3835 and more on the enterprise side).
The goal is to ensure that this short circuit either emulates a return (fail) that normally leads to vcl_synth (via R_STP_VCLFAIL) but does not prevent vcl_synth from being executed.
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 do not understand how your response would answer my questions.
-
why does this (need to) look at
req_resetand not just atVCL_RET_FAIL? -
Would it not be cleaner to have a vcl sub to handle
VCL_RET_FAILrather than invokingvcl_synth {}, but without the intended effect? The existing code path invcl_synth {}is to handle areturn(fail)fromvcl_synth {}itself, but now enteringvcl_synth {}for fail paths and not executing the expected delivery seems plain wrong to me.
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.
|
This feels too adhoc and "forced" |
Forced, for sure. Since
Is this ad-hoc core code handling or acting like a
I think we can have both. The point that was raised on our end was that an emulated failure should be emulated all the way to |
if we added, say, a |
This way it becomes possible to log extra information for log consumers, call into VMODs, or whatever else one might want to do for a synthetic 408 response.