Files
kumomta/assets
Wez Furlong f92df0fca0 lruttl: introduce allow_stale_reads option
This is paired with a corresponding field in the memoize options
struct, which is in turn exposed to the shaping helper shaping_data
cache via the `allow_stale_shaping_data` field.

The effect of setting this to true is:

* Undoes the effect of invalidate_with_epoch, as stale reads cannot
  be epoch based
* If a semaphore wait times out, and a stale value was present in
  the cache, that stale value will be returned to the caller

To facilitate this behavior, the lruttl cache introduces a new
state for a cached value: `Refreshing`, which is a combination
of both `Present` and `Pending`.

When stale reads are allowed, we take care to avoid unilaterally
replacing `Present` with `Pending` when an item has expired.

Whenever we satisfy a lookup with a stale value, we will bump a new
lruttl_stale_count counter for that cache.  Previously, we would
classify those as errors.

Something else that changed as part of this commit, is that we now set
an overall deadline for the semaphore wait operation; previously, each
wait would allow for up to the specified semaphore timeout, but now the
total wait time for that lookup will be bounded to the specified
timeout.
2025-04-30 14:01:26 -07:00
..
2023-10-12 20:43:58 -04:00
2025-03-12 11:07:52 -07:00
2025-03-12 11:07:52 -07:00
2025-03-15 07:34:00 -07:00
2025-04-16 14:53:25 -07:00
2024-05-02 10:35:49 -07:00