1. 06 Dec, 2023 1 commit
  2. 05 Dec, 2023 10 commits
    • Nils Goroll's avatar
      VRT minor version bump for #4013 · 5583667f
      Nils Goroll authored
      we need a signal if the fix is in
      5583667f
    • Poul-Henning Kamp's avatar
      c64ef384
    • Poul-Henning Kamp's avatar
    • Dridi Boukelmoune's avatar
      req_fsm: Use status 408 for reset streams · 4250083b
      Dridi Boukelmoune authored
      The 503 synth and 500 minimal response status codes are too misleading
      in this context, where the failure is attributed to the client. Among
      existing 4XX status codes, this is the closest if we stretch the timeout
      definition to "didn't complete rapidly enough before the client went
      away".
      4250083b
    • Nils Goroll's avatar
      Optimize 304 template object copying · 98b6b954
      Nils Goroll authored
      When copying a stale object after a 304 revalidation, we iterated over
      it and allocated new storage for each storage segment.
      
      So, at best, we kept the fragmentation of the existing object, or made
      it even worse. This is particularly relevant when the existing object
      was created from a chunked response, in which case the original
      segments might have been particularly small and, consequently, many in
      number.
      
      Because we wait for the stale object to complete, we know the total
      length (OA_LEN) upfront, and can ask the storage serving the copy for
      exactly the right length. This is much more efficient, as
      fragmentation is lowered and the storage engine might make a much
      better allocation decision when it knows the full length rather than
      getting piecemeal requests.
      
      We implement the improved allocation scheme through additional state
      kept for the duration of the template object copy: struct
      vbf_objiter_priv holds the pointer to the newly created busy object,
      the total yet unallocated length (initialized to OA_LEN of the existing
      object) and pointer/length to the unused portion of the currently open
      segment, if any.
      98b6b954
    • Nils Goroll's avatar
      Call trimstore only once when copying the body after a 304 · 89c1688f
      Nils Goroll authored
      It is my understanding that the objtrimstore stevedore API function is
      only to be called once when the object is complete, which I believe is
      also in line with the comment on ObjExtend() that "The final flag must
      be set on the last call".
      
      If this understanding of the API is correct, we did not adhere to it in
      the fetch code when we made a copy of an existing stale object after a
      304 response: There, we iterated over the stale object and did not set
      the final flag just once when the object was complete, but rather after
      each storage segment was copied.
      
      This commit fixes this, adds some pedentry to the simple storage and
      extends b00062.vtc to test this behavior specifically. On top, g6.vtc
      also triggered without the fix but the duplicate trim detection in place.
      
      This issue has originally surfaced in the SLASH/fellow storage where the
      trimstore function implicitly asserted to only be called once.
      
      Ref 115742b0
      Ref https://gitlab.com/uplex/varnish/slash/-/issues/33
      89c1688f
    • Poul-Henning Kamp's avatar
      9ef2b77c
    • Poul-Henning Kamp's avatar
      8df29b6b
    • Poul-Henning Kamp's avatar
      d7a9386e
    • Nils Goroll's avatar
      Fix vtest reporting when build dir is just _build/, not _build/sub/ · 7bc5cf68
      Nils Goroll authored
      See "cope with older automake" a couple of lines up
      
      Should fix the issue seen with Solaris vtesters. bash -x output:
      
      + vtc=./varnish-trunk/_build/bin/varnishtest/tests/r02686.vtc
      ++ echo ./varnish-trunk/_build/bin/varnishtest/tests/r02686.trs
      ++ sed -e 's/trs$/log/'
      + logfile=./varnish-trunk/_build/bin/varnishtest/tests/r02686.log
      + log=r02686.log
      ++ git log -n 1 --pretty=format:%H ./varnish-trunk/_build/bin/varnishtest/tests/r02686.vtc
      fatal: ambiguous argument './varnish-trunk/_build/bin/varnishtest/tests/r02686.vtc': unknown revision or path not in the working tree.
      Use '--' to separate paths from revisions, like this:
      'git <command> [<revision>...] -- [<file>...]'
      + rev=
      7bc5cf68
  3. 04 Dec, 2023 27 commits
  4. 22 Nov, 2023 1 commit
  5. 21 Nov, 2023 1 commit
    • Dridi Boukelmoune's avatar
      req_fsm: Ensure failed sub-requests reach transmit · 16f25525
      Dridi Boukelmoune authored
      A VCL failure on the client side transitions to vcl_synth, except
      failures from vcl_synth that lead to minimal errors. The ESI transport
      is not allowed to reply with minimal responses so this would lead to a
      panic.
      
      On top of that, the vcl_req_reset feature flag emulates `return (fail)`
      statements when an HTTP/2 client disconnected, resulting in the same
      panic scenario.
      
      For sub-requests, we masquerade the fail transition as a deliver and
      trade the illegal minimal response for the synthetic response.
      
      Fixes #4022
      16f25525