-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Comparing changes
Open a pull request
base repository: reflex-dev/reflex
base: v0.8.18
head repository: reflex-dev/reflex
compare: v0.8.19
- 16 commits
- 30 files changed
- 2 contributors
Commits on Nov 4, 2025
-
ENG-8212: Redis Oplock implementation (#5932)
* Token manager tracks instance_id in token_to_socket * RedisTokenManager: keep local dicts globally updated via pub/sub * Implement lost+found for StateUpdate without websocket When an update is emitted for a token, but the websocket for that token is on another instance of the app, post it to the lost+found channel where other instances are listening for updates to send to their clients. * Implement `enumerate_tokens` for TokenManager Set the groundwork for being able to broadcast updates to all connected states. * Consolidate on `_get_token_owner` * fix test_connection_banner.py: expect SocketRecord JSON * Use a single lock waiter For more efficient and fair lock queueing, each StateManagerRedis uses a single task to monitor the keyspace for lock release/expire and then wakes up the next caller that was waiting in the queue (no fairness between separate processes though). Now lockers will wait for an `asyncio.Event` which is set by the redis pubsub waiter. If any locker waits longer than the lock_expiration, it will just try to get the lock in case there was some mixup with the pub/sub, the locker won't be blocked forever. * Redis Oplock implementation * When taking a lock from redis, hold it for 80% of the lock expiration timeout * While the lock is held, other events processed against the instance will use the cached in-memory copy of the state. * When the timeout expires or another process signals intention to access a locked state, flush the modifed states to redis and release the lock. Set REFLEX_OPLOCK_ENABLED=1 to use this feature * add test_background_task.py::test_fast_yielding * Implement real redis-backed test cases for lost+found * add some polling for the emit mocks since L+F doesn't happen immediately * Fix up unit tests for OPLOCK_ENABLED mode * support py3.10 * Do not track contended leases in-process Always check redis for contended leases before granting a lease. It's a bit slower, but much more reliable and avoids racy lock_expiration timeouts when contention occurs before the lease is created or when the pubsub hasn't caught up to reality. Always start _lock_update_task in __post_init__ to avoid race where the lease is granted, then contended, but the pubsub task hasn't started to catch the contention. * Add real+mock test cases for StateManagerRedis * update test_state to use mock_redis when real redis is not available * safe await cancelled task * explicitly disable oplock for basic test_redis cases * py3.10 support: asyncio.TimeoutError != TimeoutError * break out of forever tasks when event loop goes away No point in continually spamming "no running event loop" to the console. * generalize "forever" tasks to centralize exception handling/retry * remove unused arg * less racy way test_ensure_task_limit_window_passed * rename REFLEX_STATE_MANAGER_REDIS_DEBUG to match the class name
Configuration menu - View commit details
-
Copy full SHA for 781bd06 - Browse repository at this point
Copy the full SHA 781bd06View commit details -
Configuration menu - View commit details
-
Copy full SHA for fa028b2 - Browse repository at this point
Copy the full SHA fa028b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6663dfd - Browse repository at this point
Copy the full SHA 6663dfdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0218134 - Browse repository at this point
Copy the full SHA 0218134View commit details
Commits on Nov 5, 2025
-
ENG-8227: always _clean() after app.modify_state (#5949)
app.modify_state might not always generate a delta, but it _does_ always need to be cleaned so that dirty backend vars and dirty substates (with backend vars) are not persisted to redis (and subsequently reloaded when the referenced states may not be cached)
Configuration menu - View commit details
-
Copy full SHA for 982d2fa - Browse repository at this point
Copy the full SHA 982d2faView commit details -
* cache path cwd * use get cwd for maximum perf
Configuration menu - View commit details
-
Copy full SHA for e5d3552 - Browse repository at this point
Copy the full SHA e5d3552View commit details -
check against classvar for fast case (#5947)
* check against classvar for fast case * also have one for setattr
Configuration menu - View commit details
-
Copy full SHA for 4d1c86d - Browse repository at this point
Copy the full SHA 4d1c86dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 579e922 - Browse repository at this point
Copy the full SHA 579e922View commit details
Commits on Nov 6, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 608f71e - Browse repository at this point
Copy the full SHA 608f71eView commit details -
add polling transport option (#5955)
* add polling transport option * fix CORS * set number of workers to 1 * add enterprise guard * add once why not
Configuration menu - View commit details
-
Copy full SHA for fd6e111 - Browse repository at this point
Copy the full SHA fd6e111View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80108bf - Browse repository at this point
Copy the full SHA 80108bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 03af56b - Browse repository at this point
Copy the full SHA 03af56bView commit details
Commits on Nov 10, 2025
-
ENG-8049: pass correct parameters to queueEvents (#5962)
There was also another place in the call_script callback path where the incorrect parameters have been passed since at least 0.8 ๐
Configuration menu - View commit details
-
Copy full SHA for 3c3ddc2 - Browse repository at this point
Copy the full SHA 3c3ddc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91a6bdc - Browse repository at this point
Copy the full SHA 91a6bdcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e8aebd - Browse repository at this point
Copy the full SHA 4e8aebdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ac42f5 - Browse repository at this point
Copy the full SHA 9ac42f5View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we canโt render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.8.18...v0.8.19