-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(redis): cleanup access pattern across callsites #2289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR implements a comprehensive cleanup of Redis access patterns across the codebase to eliminate non-deterministic behavior and fix distributed locking issues. The main changes include:
The changes ensure predictable system behavior by making storage decisions at configuration time rather than runtime, improving reliability in distributed environments. Important Files Changed
Confidence score: 4/5
Sequence DiagramsequenceDiagram
participant User
participant NotificationPollAPI as "GET /api/notifications/poll"
participant CronAuth as "verifyCronAuth"
participant Redis as "Redis Lock Service"
participant InactivityPoller as "pollInactivityAlerts"
User->>NotificationPollAPI: "GET /api/notifications/poll"
NotificationPollAPI->>CronAuth: "verifyCronAuth(request)"
alt Auth Failed
CronAuth-->>NotificationPollAPI: "Return auth error"
NotificationPollAPI-->>User: "Return error response"
end
NotificationPollAPI->>Redis: "acquireLock(LOCK_KEY, requestId, 120)"
alt Lock Already Held
Redis-->>NotificationPollAPI: "false (lock not acquired)"
NotificationPollAPI-->>User: "Return 202 - Polling already in progress"
else Lock Acquired
Redis-->>NotificationPollAPI: "true (lock acquired)"
NotificationPollAPI->>InactivityPoller: "pollInactivityAlerts()"
InactivityPoller-->>NotificationPollAPI: "Return polling results"
NotificationPollAPI-->>User: "Return 200 - Polling completed"
end
NotificationPollAPI->>Redis: "releaseLock(LOCK_KEY, requestId)"
Redis-->>NotificationPollAPI: "Lock released"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
13 files reviewed, 2 comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
13 files reviewed, no comments
* feat(folders): add the ability to create a folder within a folder in popover (#2287) * fix(agent): filter out empty params to ensure LLM can set tool params at runtime (#2288) * fix(mcp): added backfill effect to add missing descriptions for mcp tools (#2290) * fix(redis): cleanup access pattern across callsites (#2289) * fix(redis): cleanup access pattern across callsites * swap redis command to be non blocking * improvement(log-details): polling, trace spans (#2292) --------- Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com> Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Summary
Cleanup access pattern across codebase for redis client.
Type of Change
Testing
Tested with @waleedlatif1
Checklist