fix: deliver linked state updates to all clients - #6934
fix: deliver linked state updates to all clients#6934benedikt-bartscher wants to merge 4 commits into
Conversation
Greptile SummaryThe PR adds a token-manager connectivity abstraction and refreshes Redis-owned socket records so shared-state updates can reach linked clients on other backend instances.
Confidence Score: 4/5The PR is not yet safe to merge because linked updates can still be sent to a disconnected SID while local disconnect cleanup is pending. A locally owned cached socket record is accepted without refreshing ownership, while disconnect cleanup runs asynchronously and update delivery uses that same cached SID, leaving the previously reported dropped-update race reachable. Files Needing Attention: reflex/utils/token_manager.py, reflex/app.py
|
| Filename | Overview |
|---|---|
| reflex/istate/shared.py | Shared-state fan-out now checks token connectivity asynchronously before modifying linked client state; the previously reported pending-disconnect race remains. |
| reflex/utils/token_manager.py | Adds a common connectivity API and Redis ownership refresh, but locally cached ownership is still trusted during asynchronous disconnect cleanup. |
| tests/units/istate/test_shared.py | Adds coverage for local filtering and cross-instance Redis fan-out. |
| tests/units/utils/test_token_manager.py | Adds focused coverage for local, stale foreign, moved foreign, and Redis-error connection checks. |
| news/6934.bugfix.md | Documents the intended cross-worker shared-state delivery fix. |
Reviews (3): Last reviewed commit: "cubic" | Re-trigger Greptile
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Uh oh!
There was an error while loading. Please reload this page.