1. 03 Mar, 2021 7 commits
    • Dridi Boukelmoune's avatar
      3efdc84b
    • Dridi Boukelmoune's avatar
      builtin: Split vcl_backend_response too · 7d2e14df
      Dridi Boukelmoune authored
      It's one more indirection than vcl_recv because the same logic applies
      to multiple cases, so we first have subs for the different conditions
      and they all call the shared vcl_beresp_hitmiss sub.
      
      The vcl_beresp_hitmiss sub returns on purpose, that doesn't change the
      default VCL behavior and makes it more usable from VCL code:
      
          if (some user condition applies) {
                  call vcl_beresp_hitmiss;
          }
      
      No need to force all call sites to return(deliver) when the desired
      outcome is explicit. Extracting this sub also enables VCL authors to
      only tweak the hitmiss TTL in one place.
      
      For better compliance, we might also introduce a vcl_beresp_hitpass sub
      for some of the built-in cases where a hit-for-miss object might be less
      appropriate. The compliance effort will however change some semantics
      and is outside of the scope of this split.
      7d2e14df
    • Dridi Boukelmoune's avatar
      builtin: Split vcl_recv in logical chunks · 90127a47
      Dridi Boukelmoune authored
      There is a very slight breaking change in the sense that the host header
      check is grouped with its normalization which swaps its order with the
      PRI method check.
      
      In practice that only means that if you have both an unattended PRI
      request missing a host header, you'll get a 400 instead of a 405. You
      have to get both wrong in the first place so I don't consider this a
      concern.
      90127a47
    • Dridi Boukelmoune's avatar
      vcc: Allow arbitrary subs in the built-in VCL · 28590eef
      Dridi Boukelmoune authored
      Now that we know in advance the available suboutines in the built-in VCL
      we can use that as the condition to create an append-able subroutine
      when the vcl_ prefix is encountered.
      
      This work is currently incomplete, at least because non-state built-in
      subroutines are currently not listed when an unknwon subroutine is
      encountered.
      
      Also, instead of proper test coverage this currently uses b00000.vtc as
      a strawman to show how to skip a specific processing.
      28590eef
    • Dridi Boukelmoune's avatar
      vcc: Parse the built-in VCL independently · e45595ec
      Dridi Boukelmoune authored
      This is a lookahead parsing to learn about built-in subroutines that are
      not tied to a VCL state. Instead of maintaining a mapping of the other
      subroutines the builtin.vcl file itself becomes authoritative.
      e45595ec
    • Dridi Boukelmoune's avatar
      builtin: Adopt our C code style for the builtin VCL · 4646a5bd
      Dridi Boukelmoune authored
      I removed the else keyword from vcl_backend_response because it doesn't
      add any value.
      
      Better diff with the --ignore-all-space option.
      4646a5bd
    • Dridi Boukelmoune's avatar
      builtin: Standardize all comments to '#' · 5b89fb4f
      Dridi Boukelmoune authored
      It's a bit all over the place right now and '#' is the most "scripty" of
      the 3 types of comments we have.
      
      Better diff with the --word-diff --word-diff-regex=. options.
      
      Salavaged from #3503
      5b89fb4f
  2. 02 Mar, 2021 3 commits
    • Poul-Henning Kamp's avatar
      doc: Bring back changes to vcl-hashing.rst · 75c7f15a
      Poul-Henning Kamp authored
      On their own, those changes improve the documentation and don't mention
      the reverted "hash_data() in vcl_recv" feature.
      
      Refs e98e8e64
      75c7f15a
    • Dridi Boukelmoune's avatar
      hash: Revert recent hash changes · 5ea8940c
      Dridi Boukelmoune authored
      This reverts the following commits:
      
      - e98e8e64.
        "Documentation updates for changed `vcl_hash{}` / `hash_data()`"
      - 001279eb.
        "Document proper design pattern for using hash_data() in vcl_recv,"
      - e36573e2.
        "Add a test-case for hash_data() in vcl_recv{}"
      - 03fe0cee.
        "Allow hash_data() in vcl_recv{}"
      - 4ebc3cfe.
        "Make it possible to override the initial digest, and explain in"
      - d6ad52f5
        "Change the way we calculate the hash key for the cache."
      
      Conflicts:
      	doc/sphinx/reference/dp_vcl_recv_hash.rst
      	doc/sphinx/reference/index.rst
      
      Concerns were raised regarding a change of the way we compute the hash
      key outside of the dot-zero release where we would expect such breaking
      changes (among other things, vmod_shard relies on hash stability).
      
      There is also no definite consensus of how to handle hashing from
      vcl_recv.
      5ea8940c
    • Nils Goroll's avatar
      Accept all ENET* ECONN* EHOST* errnos · 81aa74cc
      Nils Goroll authored
      ... documented on Linux as POSIX.1
      
      The exception here is ECONNREFUSED which so far we only tolerate for
      Solaris and which seems to make sense for connect() only.
      
      To be discussed in #3539
      81aa74cc
  3. 01 Mar, 2021 8 commits
  4. 25 Feb, 2021 1 commit
  5. 24 Feb, 2021 12 commits
  6. 23 Feb, 2021 2 commits
    • Dridi Boukelmoune's avatar
      pool: Wait when we run out of workers · 68727334
      Dridi Boukelmoune authored
      Since the removal of dry signals, pools will spin when they run out of
      threads and increment MAIN.threads_limited at a very high rate. That
      spike in CPU consumption will also have detrimental effects on useful
      tasks.
      
      This change introduces a 1s delay when the pool is saturated. This
      allows to periodically exercise the watchdog check. We could wait until
      the watchdog times out but we would also miss potential updates to the
      thread_pool_watchdog parameter.
      
      To avoid spurious increments of MAIN.threads_limited we only take task
      submissions into account and ignore timeouts of the condvar.
      
      Refs #2942
      Refs #3531
      68727334
    • Poul-Henning Kamp's avatar
      Add missing X-ref · fbee34a6
      Poul-Henning Kamp authored
      fbee34a6
  7. 22 Feb, 2021 7 commits