Downgrade cachex as the new version gets OOM#5024
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR refactors the GraphQL cache provider system by introducing a new transactional locking mechanism for concurrent cache miss handling, replacing ETS-backed TTL management with Cachex-native TTL constants, deprecating the global cache provider, and downgrading the Cachex dependency from v4 to v3. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client Request
participant Cache as Cachex Cache
participant Lock as Lock Manager
participant Unlocker as Unlocker Process
participant Execute as Cache Miss Handler
Client->>Cache: get(key)
alt Cache Hit
Cache-->>Client: return decompressed value
else Cache Miss
Client->>Lock: obtain_lock(key)
activate Lock
Lock-->>Client: lock acquired
Client->>Execute: execute_cache_miss_function()
Execute->>Execute: call function, get result
Execute->>Cache: store result with TTL
Execute-->>Client: return result
Client->>Unlocker: schedule unlock after max_lock_acquired_time_ms
activate Unlocker
Client->>Lock: unlock(key)
deactivate Lock
Unlocker->>Unlocker: wait for timeout
Unlocker->>Unlocker: self-terminate
deactivate Unlocker
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
43c05f0 to
34c9818
Compare
Changes
Ticket
Checklist:
Summary by CodeRabbit