1. 24 Dec, 2019 2 commits
    • Martin Blix Grydeland's avatar
      Add an assert that VRT_delete_backend is only called once · 08593cb9
      Martin Blix Grydeland authored
      VRT_delete_backend() sets be->cooled to non-zero as the only place where
      that is done. Assert that it is zero on entry as a check that
      VRT_delete_backend isn't called multiple times.
      08593cb9
    • Martin Blix Grydeland's avatar
      Set be->cooled while holding backends_mtx · bea2939c
      Martin Blix Grydeland authored
      Several functions (VBE_Poll and vbe_destroy) tests be->cooled == 0 to
      determine which of the two lists backends and cool_backends a specific
      instance currently lives on. If the flag is in the process of being
      changed, then the wrong list head may be used and will result in strange
      bugs.
      bea2939c
  2. 23 Dec, 2019 4 commits
  3. 21 Dec, 2019 1 commit
    • Nils Goroll's avatar
      demo and test use of the stringified session attributes · 7c4cdd48
      Nils Goroll authored
      While, in most of the code, we now use SA_*_ADDR and format the
      address/port when needed, for the client ip and port, there still exist
      formatted strings as session attributes.
      
      I recently came across this in a different context and wondered if we
      should remove these string session attributes, but as we use them multiple
      times for each request, that would only imply additional overhead for
      repeated string formatting.  So I think we should keep them for now,
      but we might want to consider to add to struct suckaddr optional
      formatted strings to avoid the duplicated formatting which already
      happens.
      
      This commit adds a regression test.
      
      Motivated by #3173
      7c4cdd48
  4. 20 Dec, 2019 7 commits
    • Dridi Boukelmoune's avatar
      Tweak SLT_Notice to better fit the VSL · 6a483b19
      Dridi Boukelmoune authored
      Martin entrusted me with those changes after I pointed out that [core]
      was not a great prefix considering that VSL records already have the
      notion of a prefix.
      
      I opted for:
      
      - an actionable "vsl:" prefix for core notice messages
      - a prefix naming scheme mapping to manual pages
      
      As a result I changed the documentation a bit.
      
      Better diff with --word-diff --ignore-all-space options.
      6a483b19
    • Guillaume Quintard's avatar
      513ae61b
    • Guillaume Quintard's avatar
      [cci] switch to py3-sphinx for alpine · cf7259b5
      Guillaume Quintard authored
      cf7259b5
    • Martin Blix Grydeland's avatar
      Log using SLT_Notice on condfetch streaming delay · 9bf8e871
      Martin Blix Grydeland authored
      Log a notice message when delaying a conditional fetch and the stale
      template object is still streaming.
      9bf8e871
    • Martin Blix Grydeland's avatar
      Add a SLT_Notice VSL tag · 4c5aba28
      Martin Blix Grydeland authored
      This VSL tag will be used for informational messages related to
      exceptional handling of requests.
      4c5aba28
    • Martin Blix Grydeland's avatar
      Conditional fetch wait for streaming stale object · 98dc20f4
      Martin Blix Grydeland authored
      Wait for the stale object to become fully fetched, so that we can catch
      fetch errors, before we unbusy the new object. This serves two
      purposes. First it helps with request coalescing, and stops long chains of
      IMS-updated short-TTL objects all streaming from a single slow body
      fetch. Second it makes sure that all the object attributes are complete
      when we copy them (this would be an issue for ie OA_GZIPBITS).
      
      This patch OBE's r01646.vtc, and slightly patches r01648.vtc to expect a
      503 instead of a 200 and a broken connection on the failing client.
      
      Fixes: #3089
      98dc20f4
    • Dridi Boukelmoune's avatar
      Avoid loose vocabulary around VCL sub · 17457b48
      Dridi Boukelmoune authored
      The code base and documentation refer to ``sub`` symbols as:
      
      - subroutines
      - functions
      - methods
      - procedures
      - callbacks
      
      This change focuses on always referring to them as subroutines in the
      documentation. During this documentation sweep, there were a lot of
      false positives since VCL, VMODs and HTTP also share that vocabulary
      and I may have missed false negatives, especially for generated bits
      of documentation.
      
      Some parts of the documentation were not touched on purpose: upgrade
      notes and changelogs of past releases, PHK random outbursts, etc.
      
      Now that the documentation is hopefully taken care of the same needs
      to happen in the code base, starting with user-facing error messages
      and then data structures names, function names etc.
      
      There will be however one exception. Anything referring to the scope
      of a subroutine, but being worded as if it referred to the subroutine
      itself will use scope instead.
      
      As this will touch a lot of code, it will be done incrementally, much
      like this change focused on non-generated documentation (and VCC files
      don't count as generated in this context).
      
      I also fixed RST formatting issues I noticed during my sweep.
      
      Better diff with the --word-diff --ignore-all-space options.
      17457b48
  5. 19 Dec, 2019 4 commits
  6. 18 Dec, 2019 1 commit
    • Dridi Boukelmoune's avatar
      Improve the VCL recursive sub calls error message · db0baa74
      Dridi Boukelmoune authored
      Before:
      
          ...called from "foo"
          ('<vcl.inline>' Line 5 Pos 27)
                  sub bar { call foo; }
          --------------------------#--
      
      After:
      
          ...called from "bar"
          ('<vcl.inline>' Line 5 Pos 24)
                  sub bar { call foo; }
          -----------------------###---
      
      This fixes the "called from" part of the message to refer to the caller
      instead of the callee, and underlines the symbol token instead of the
      semi-colon.
      db0baa74
  7. 17 Dec, 2019 3 commits
  8. 16 Dec, 2019 14 commits
  9. 15 Dec, 2019 1 commit
  10. 13 Dec, 2019 3 commits