Skip to content

Fix/presence user syncing nonblocking#19885

Open
shcherbak wants to merge 8 commits into
element-hq:developfrom
shcherbak:fix/presence-user-syncing-nonblocking
Open

Fix/presence user syncing nonblocking#19885
shcherbak wants to merge 8 commits into
element-hq:developfrom
shcherbak:fix/presence-user-syncing-nonblocking

Conversation

@shcherbak

Copy link
Copy Markdown
Contributor

presence: run set_state in background during user_syncing to unblock sync

user_syncing() was awaiting set_state() before returning the context
manager, causing every /sync request to block on presence I/O (DB
read/write on the presence writer, or an HTTP RPC from workers). Move
the counter increment and mark_as_coming_online ahead of the call, then
fire set_state via run_in_background consistent with how _end() is
already handled.

…sync

user_syncing() was awaiting set_state() before returning the context
manager, causing every /sync request to block on presence I/O (DB
read/write on the presence writer, or an HTTP RPC from workers). Move
the counter increment and mark_as_coming_online ahead of the call, then
fire set_state via run_in_background  consistent with how _end() is
already handled.
@shcherbak shcherbak requested a review from a team as a code owner June 26, 2026 20:57
…sync

user_syncing() was awaiting set_state() before returning the context
manager, causing every /sync request to block on presence I/O (DB
read/write on the presence writer, or an HTTP RPC from workers). Move
the counter increment and mark_as_coming_online ahead of the call, then
fire set_state via run_in_background  consistent with how _end() is
already handled.
…sync

user_syncing() was awaiting set_state() before returning the context
manager, causing every /sync request to block on presence I/O (DB
read/write on the presence writer, or an HTTP RPC from workers). Move
the counter increment and mark_as_coming_online ahead of the call, then
fire set_state via run_in_background  consistent with how _end() is
already handled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant