Age | Commit message (Collapse) | Author |
|
Previously clients to the cache put interface writing excess response
body payloads (or bodies for responses that shouldn't have bodies) could
trigger a panic in the body parser. This change opts to just drain these
excess payloads without writing the excess body into cache.
|
|
Co-authored-by: Harald Gutmann <[email protected]>
|
|
|
|
|
|
|
|
|
|
When supporting streaming partial writes, the cache miss request may not
always find the corresponding body reader for the storage asset that its
upstream write is trying to fill.
This change adds a lookup_streaming_write storage API and allows the
miss handler to provide a streaming write tag for use with the API, so
that it may find the matching hit handler to serve downstream.
|
|
This changes the memory ordering for the lock status load to `SeqCst` from
`Relaxed` to eliminate a potential source of panics.
Panics had the frames:
```
pingora_proxy::proxy_cache::<T>::handle_lock_status (proxy_cache.rs:748)
pingora_proxy::proxy_cache::<T>::proxy_cache::{{closure}} (proxy_cache.rs:211)
pingora_proxy::HttpProxy<T>::process_request::{{closure}} (lib.rs:509)
pingora_proxy::HttpProxy<T>::process_new_http::{{closure}} (lib.rs:727)
```
which showed we were checking on the status of the lock, after waiting on it,
and still seeing its status as waiting. The status is returned by value, so this
is not a time-of-check to time-of-use problem, this is an inconsistency in how
the lock status is managed. The change in memory order is mostly for the sake of
this programmer's attempts to understand what is happening.
This also completes a couple of TODOs to limit the wait period as well as tag
the span with the lock status.
|
|
If we have a cache miss, any meta in this object is invalid. Unset
it so that we don't use it later.
|
|
|
|
This cache phase indicates when we are serving a stale cache hit, but
there is another request currently updating the asset.
|
|
There could be a race condition where a Stale request waiting on cache
lock retries the cache lock and lookup, but enters cache_miss after
finding the asset is no longer present.
|
|
Also remove the doc_async_trait cfg since it is no longer viable.
|
|
|
|
This helps the storage to log/track different type of cache deletions.
|
|
|
|
|
|
|
|
|
|
https://github.com/cloudflare/pingora/issues/181
Ran:
```
rg --pcre2 '(?<!(trace\!\()|(println\!\()|(warn\!\()|(info\!\()|(debug\!\()|(format\!\()|(error\!\()|(write\!\()|(panic\!\())\".*\{.+\"'
```
and audited the 200+ results by hand. Only messed up in a few places!
Hat-tip to Kevin for helping me understand the compile error messages I was
seeing trying to fix this naively.
|
|
|
|
Also update a few comment links for the newest HTTP RFCs.
|
|
And other things.
Co-authored-by: DimanNe <[email protected]>
Co-authored-by: Xiaobo Liu <[email protected]>
Co-authored-by: houseme <[email protected]>
Co-authored-by: lilo <[email protected]>
Co-authored-by: Yang He <[email protected]>
|
|
Replicated-from: https://github.com/cloudflare/pingora/pull/131
Includes-commit: ae706cdf49324f6f871b2bfd712f01f07b1dfed0
|
|
Replicated-from: https://github.com/cloudflare/pingora/pull/18
Includes-commit: e5a3865e9dd5a381491b0e2ee8d2661f4fb59ffd
Includes-commit: f4af9ad3a50f6ce37f1e936460357f9c2cd3d247
Includes-commit: bbfb1eb5ba7194791b1128c83f5d4d8e5719e4f2
Includes-commit: f74cf9f82aac6f9fb47962d0dcdc69add831cf2b
|
|
Signed-off-by: battmdpkq <[email protected]>
Replicated-from: https://github.com/cloudflare/pingora/pull/123
Includes-commit: 943bedb2811dc9a2b9b31c2f3576aa7cd2cb8f90
|
|
The vast majority of these are redundant imports.
|
|
Co-authored-by: =?~~~?q?Ren=C3=A9=20Kla=C4=8Dan?= <[email protected]>
Co-authored-by: 12932 <[email protected]>
Co-authored-by: Alessandro <[email protected]>
Co-authored-by: InImpasse <[email protected]>
Co-authored-by: Paul James Cleary <[email protected]>
Co-authored-by: Yang Hau <[email protected]>
Co-authored-by: Morpheus <[email protected]>
Co-authored-by: mobeicanyue <[email protected]>
Co-authored-by: Twacqwq <[email protected]>
Co-authored-by: Bobby <[email protected]>
Co-authored-by: Dup4 <[email protected]>
Co-authored-by: Josh Soref <[email protected]>
Co-authored-by: Sheldon <[email protected]>
Co-authored-by: houseme <[email protected]>
Co-authored-by: ZhangIvan1 <[email protected]>
Co-authored-by: GrahamQuan <[email protected]>
Co-authored-by: =?~~~?q?Cristian=20Paul=20Pe=C3=B1aranda=20Rojas?= <[email protected]>
Co-authored-by: Nathan Sit <[email protected]>
Co-authored-by: David Lee <[email protected]>
Co-authored-by: Mengliang Su <[email protected]>
Co-authored-by: =?~~~?q?=EA=B9=80=EC=84=A0=EC=9A=B0?= <[email protected]>
Co-authored-by: Allen Huang <[email protected]>
Co-authored-by: Opacity <[email protected]>
Co-authored-by: cris <[email protected]>
Co-authored-by: Killian Ye <[email protected]>
Co-authored-by: Jiwei-dev <[email protected]>
Co-authored-by: Jinfeng Wang <[email protected]>
Co-authored-by: Ikko Eltociear Ashimine <[email protected]>
|
|
Co-authored-by: Andrew Hauck <[email protected]>
Co-authored-by: Edward Wang <[email protected]>
|