mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix(cache): persist hanging alert state after isolated reads
This commit is contained in:
parent
d4d676bdc5
commit
d098536b92
1 changed files with 7 additions and 0 deletions
|
|
@ -138,6 +138,13 @@ class AlertingHangingRequestCheck:
|
|||
# flag so the entry is skipped on later ticks; one alert per hang,
|
||||
# with the existing TTL still handling cleanup
|
||||
hanging_request_data.alerted = True
|
||||
# InMemoryCache returns read-isolated mutable values. Persist the
|
||||
# state transition explicitly so the next checker tick observes
|
||||
# that this request has already been alerted.
|
||||
await self.hanging_request_cache.async_set_cache(
|
||||
key=request_id,
|
||||
value=hanging_request_data,
|
||||
)
|
||||
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue