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
v1d: Log client write error #4042
base: master
Are you sure you want to change the base?
Conversation
c0f6e31
to
a6d962b
Compare
Bugwash:
|
bugwash:
|
nitpick: this can be addressed with |
This is not quite a counterpart of FetchError that is used in more contexts than just a VFP.
This is not going through a VDP, but it eventually will. Refs varnishcache#4035
I'd like to cover this during bugwash today, before we send this to production. |
if (sc != SC_NULL) | ||
if (sc != SC_NULL) { | ||
VSLb(req->vsl, SLT_DeliveryError, "resp: \"%s\" %d \"%s\"", | ||
sc->desc, errno, VAS_errtxt(errno)); |
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 think we should use sc->name
as with SessClose
and add the long descriptions from include/tbl/sess_close.h
to the documentation. Reason: name
is shorter, less likely to change for editorial reasons and easier to parse (does not contain spaces). We should then also remove the quotes.
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.
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 think we should use
sc->name
as withSessClose
and add the long descriptions frominclude/tbl/sess_close.h
I'm all for logging the names, but against including the descriptions in the manual. "See other section" ought to be enough.
We should then also remove the quotes.
Once we switch to the name, that goes without saying :)
See 10f1e5c
I think we should instead add a section dedicated to session/stream close reasons in the manual and add some codegen to generate the RST from the sess_close.h
table. Then all the tags that print a name can refer to that section and we avoid manual sync.
If you don't, I will.
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.
That if statement should be based on whether sc is an error instead of not null.
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 am happy with all your answers. In particular, moving the session close reasons to a separate docs section makes sense once they are no longer "owned" by SessClose
.
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'm having second thoughts on the tag format and I'm wondering whether we should make it free form like FetchError
so that any VDP could use DeliveryError
to log errors?
That does not change my plans to address SessClose
et al to use the name over the description and add a manual section.
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.
How about the prefix (resp
here) can be replaced by a VDP name and then the format is custom?
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 thought about doing that, but I think I would rather keep the VDP prefix informal. The current "backend write error" prefix is very informal and unusual (and yet query-able) and should be improved, but generally it should be possible to issue DeliveryError
logs outside of a VDP too, as long as it is related to delivery? Like FetchError
today.
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.
bugwash: It seems we actually agree on the alternative format <vdpname>: <error message free form>
this is for consistency, to simplify parsing and to reduce the amount of data logged with VSL. Motivated by varnishcache#4042
bionic failure,
|
Instead of adding hoops to the documentation, in particular to keep it in sync, improve the only location where we emit HTC status logs. We could also consider replacing the HTC enum with a struct, similar to what we did in other places. The struct symbols would be named after the UPPER name from the table, have a name and description fields, possibly replace the error number with a simple is_err field. Capturing the long description like this is less intrusive. Refs #4042
goes after march-15 release |
during bugwash, @bsdphk brought up the question if this could affect vsl clients, and while it does not look like it, |
after march15 release |
this is for consistency, to simplify parsing and to reduce the amount of data logged with VSL. Motivated by #4042
Some scenarios like hitting
send_timeout
because of a dripping write leaves no clue that an error occurred from the client request logs alone.This introduces a client counterpart for:
Refs 49e44e3