- 10 Dec, 2021 2 commits
-
-
Nils Goroll authored
Fixes #3752
-
Nils Goroll authored
-
- 07 Dec, 2021 1 commit
-
-
Dridi Boukelmoune authored
This reuses the stringform concept and introduces a similar bodyform flag for STRINGS and BLOB types. We can now assign either a STRING or a BLOB to [be]resp.body, without breaking the VRT ABI and API. In fact, the VRT API now uses a void* C type for the BODY VCL type and finds which type to use based on enum lbody_e. The enum completely changed but macros were added to maintain the API, and because of this change, enum lbody_e literals are formatted in two steps. As a result the BODY type grew another noindent flag. It prevents the insertion of white space between the LBODY_{ADD,SET}_ prefix and the type name suffix (BLOB or STRANDS).
-
- 06 Dec, 2021 1 commit
-
-
Lachlan Abbott authored
-
- 03 Dec, 2021 2 commits
-
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
This way they can all nicely align in the VTC output. The recently added "end" legend that denotes the end of a transaction before a match happened for the given VXID conflicted with the end of the logexpect spec. The latter was renamed to "done".
-
- 02 Dec, 2021 2 commits
-
-
Dridi Boukelmoune authored
When a transaction ends, there will be nothing left to match for the transaction's VXID. Instead of timing the whole test case out, fail immediately.
-
Martin Blix Grydeland authored
The logics were off by one in the available buffer space checks, causing us to loose one word of per thread log buffer space, and making reasoning about available space tricky. Fix this. Refs 10749ffe Refs #3745
-
- 01 Dec, 2021 9 commits
-
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
Dridi Boukelmoune authored
That is, when it's a request or backend transaction, otherwise it's still logged with VXID 0. The goal is to allow a correlation between VCL statements and their workspace footprint by sharing the same transaction instead of being split between raw and vxid scopes. That kind of debugging becomes possible when the workspace debug flag is used and VCL_trace records are not masked. Given the verbosity of both workspace and trace logs, we would need new tools to process transactions for this purpose and until we can link everything we have a chicken-egg problem. This change does not go all the way and relies on the thread-local worker reference to opportunistically log into its VSL buffer when it has one. When the workspace is initialized, the buffer may not be ready yet, so some logs may still end up raw. What's likely going to be missing is workspace early initialization and teardown: in other words before and after VCL execution, which should be good enough for the purpose of debugging workspace operations in VCL tasks.
-
Dridi Boukelmoune authored
Since its primary usage will be workspace logs, workers can be initialized earlier to offer even more opportunity for logging.
-
Nils Goroll authored
today: VRBT_REMOVE returns the element argument no matter if it was present in the tree or not, so it can not sensibly be used for assertions.
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
The old VRT_AddV[DF]P() and VRT_RemoveV[DF]P() are "soft deprecated" and work the same as previous. (Hard deprecation after next major.) Replaced by: const char *VRT_AddFilter(VRT_CTX, const struct vfp *, const struct vdp * void VRT_RemoveFilter(VRT_CTX, const struct vfp *, const struct vdp *); VRT_CTX is mandatory. Both kinds of filters can be handled in one go, but the names must be identical. VRT_AddFilter returns NULL on success, and VRT_fail'ed error message otherwise. Supersedes #3287
-
Poul-Henning Kamp authored
-
Martin Blix Grydeland authored
HSH_Purge() suffers from a problem when there are more objcores on a given objhead than we can hold temporary references for on the available workspace, and multiple purges for the same objhead are issued at the same time. The previous algorithm would use a flag on the objcores (OC_F_PURGED) in order to keep track of how far in the list we had gotten. This becomes a problem when multiple threads are purging the same objhead at the same time. When a new purge is started, the flags would be reset, which would cause any existing purge thread to restart. If a steady stream of purges for a given objhead is issued and enough objcores are present, none would finish. This rework uses OC references in the list as bookmarks, in order to know how far into the list we were when releasing the mutex partway through and want to resume again. This relies on the list not being reordered while we are not holding the mutex. The only place where that happens is in HSH_Unbusy(), where an OC_F_BUSY OC is moved first in the list. This does not cause problems because we skip OC_F_BUSY OCs. The OC_F_PURGED flag is removed as it is no longer needed. The existing r02372.vtc test case exercises this code.
-
- 29 Nov, 2021 11 commits
-
-
Poul-Henning Kamp authored
-
Dridi Boukelmoune authored
-
Poul-Henning Kamp authored
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
Just like the file cursor reads from stdin when opening "-". And in addition, teach varnishlog to also write to stdout when it is opening the file directly. Likewise, put varnishncsa on par with varnishlog in that regard. It is now possible to compress binary VSL on the fly without taking a detour to the file system, see u00019.vtc for an example. Considering how VUT daemonizes, a "-w -" option in daemon mode becomes an error as well. Refs #3740
-
Martin Blix Grydeland authored
When vsl_reclen (maximum length of a record) is close to vsl_buffer, the vsl buffer is flushed to the main shared memory log for every record. This is because we test if there is space for vsl_reclen, not the actual size of the formatted log record (which likely is much smaller). Fix this by doing the formatting in up to two stages. If the first stage shows that we overflowed, but would not have overflown vcl_reclen if there was more room in the buffer, then flush and redo the formatting. This limits the extra work of formatting twice only to the one record that happened to overflow the buffer.
-
Dridi Boukelmoune authored
Otherwise valid code can panic on workspace exhaustion: std.ip(req.http.X-Real-IP, std.ip(req.http.X-Client-IP, client.ip)) If the nested std.ip() call runs out of workspace, it will return a null ip instead of the fallback, and since the outer std.ip() call is getting a fallback argument, it will panic upon checking the suckaddr sanity. Refs a3b26d0b
-
Nils Goroll authored
-
Nils Goroll authored
{req,bereq}.time remain constant across restarts/retries req_top.time remains constant across esi includes The other values represent the time when the respective object was created.
-
David Korczynski authored
-
- 24 Nov, 2021 7 commits
-
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
(Last part of #3599)
-
Poul-Henning Kamp authored
(4th part of #3599)
-
Poul-Henning Kamp authored
(3rd part of #3599)
-
Poul-Henning Kamp authored
(2nd part of #3599)
-
Poul-Henning Kamp authored
(First part of #3599)
-
Poul-Henning Kamp authored
-
- 23 Nov, 2021 5 commits
-
-
Martin Blix Grydeland authored
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
Martin Blix Grydeland authored
-
Martin Blix Grydeland authored
-