1. 19 Dec, 2021 4 commits
  2. 18 Dec, 2021 1 commit
  3. 16 Dec, 2021 1 commit
  4. 15 Dec, 2021 1 commit
    • Dridi Boukelmoune's avatar
      doc: Sort VCL variables alphabetically · 948cf26d
      Dridi Boukelmoune authored
      They are grouped by categories and that hasn't changed, and the order
      of groups haven't changed. All occurrences of foo.* variables are sorted
      alphabetically instead of approximately by relationship between each
      other.
      
      Inside the first group, variables are now ordered based on the PROXY
      protocol diagram:
      
      - client
      - server
      - remote
      - local
      
      A note was added and is hopefully visible enough to maintain this order.
      
      You can verify that nothing changed:
      
          $ COMMIT=<this-commit-hash>
          $ git show $COMMIT~:doc/sphinx/reference/vcl_var.rst |
            sed '/^$/d' |
            sort |
            sha1sum
          3400130e88c0456b3bc779b9dfeeff09e130efa3
          $ git show ${COMMIT}:doc/sphinx/reference/vcl_var.rst |
            sed '/^$/d ; /.. NOTE:/d' |
            sort |
            sha1sum
          3400130e88c0456b3bc779b9dfeeff09e130efa3
      
      Use whatever alternative to sha1sum your system may provide.
      948cf26d
  5. 14 Dec, 2021 11 commits
  6. 13 Dec, 2021 4 commits
    • Dridi Boukelmoune's avatar
      6613cca6
    • Dridi Boukelmoune's avatar
      param: Infrastructure for deprecated aliases · c6e3d6b5
      Dridi Boukelmoune authored
      With this change, we can formalize the renaming of a parameter while
      maintaining the old name temporarily for compatibility.
      
      A deprecated alias can be set with either param.set or the -p option,
      but won't be listed by:
      
      - param.show [-j]
      - param.show [-j] changed
      - param.show -l
      
      Only an explicit param.show for the name of the alias will provide a
      minimal documentation with a deprecation notice and the current value.
      In the manual, there is only a deprecation notice. The rationale is
      that administration tools shouldn't pick them up when enumerating the
      parameters.
      
      Since we currently don't have deprecated parameters, this can only be
      tested manually, for example:
      
          PARAM_ALIAS(vcl_dir, vcl_path)
      
      To ensure that we don't break this, we could consider having a perpetual
      deprecated parameter.
      c6e3d6b5
    • Dridi Boukelmoune's avatar
      param: Comment OCD · 66ecc836
      Dridi Boukelmoune authored
      66ecc836
    • Dridi Boukelmoune's avatar
      95b10d1b
  7. 10 Dec, 2021 2 commits
  8. 07 Dec, 2021 1 commit
    • Dridi Boukelmoune's avatar
      vcc: set BODY [+]= STRINGS|BLOB · cb446a38
      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).
      cb446a38
  9. 06 Dec, 2021 1 commit
  10. 03 Dec, 2021 2 commits
  11. 02 Dec, 2021 2 commits
  12. 01 Dec, 2021 9 commits
    • Poul-Henning Kamp's avatar
      Off by one error · 10749ffe
      Poul-Henning Kamp authored
      10749ffe
    • Poul-Henning Kamp's avatar
      5ba919d7
    • Dridi Boukelmoune's avatar
      ws: Tie workspace logs to their transactions · 588d5c45
      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.
      588d5c45
    • Dridi Boukelmoune's avatar
      wrk: Opportunistic logging in a worker's VSL buffer · f9f2a865
      Dridi Boukelmoune authored
      Since its primary usage will be workspace logs, workers can be
      initialized earlier to offer even more opportunity for logging.
      f9f2a865
    • Nils Goroll's avatar
      Learn something new every day · e3cfeb55
      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.
      e3cfeb55
    • Poul-Henning Kamp's avatar
    • Poul-Henning Kamp's avatar
      Rework VDP/VFP filter registry · 19f77efe
      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
      19f77efe
    • Poul-Henning Kamp's avatar
    • Martin Blix Grydeland's avatar
      Rework HSH_Purge() · e51208cb
      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.
      e51208cb
  13. 29 Nov, 2021 1 commit