You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A room's version can restart at 1 after an hour of steady presence #891
The _version row expires one hour after its last bump, but a write that only refreshes a timestamp doesn't bump it, so a room whose people stay for more than an hour loses its _version row to cleanup, and the next change starts the counter again at 1, which a reader that last saw 1 takes as no change.
Checked on main (ce76757), without an external object cache:
Step
wp_get_presence_room_versions()
Client a joins
'1'
a keeps refreshing; _version passes its expiry, which the refreshes don't push back
'1'
wp_delete_expired_presence_data() runs
null
Client b joins
'1'
The comment in wp_presence_bump_room_version() says the row "outlives every row in the room", which holds for a room that changes but not for one that stays still. With an external object cache, evicting version:{room} restarts the counter the same way.
Tasks
Keep a room's version from repeating a value it has already handed out, whether by extending _version on refresh or by giving the counter a part that changes when it's recreated
Test: a version read before the _version row is cleaned up differs from the one read after the next arrival
Not a bug in practice: once cleanup removes _version the version reads null until the next arrival, and the only reader, gutenberg-sync-engines' SSE stream, polls every 0.5s, so it sees 1 → null as a change and rereads the room; missing an arrival would need the cleanup and that arrival inside the same half second.
Activity
huzaifaalmesbah commentedon Oct 23, 2026
Not a bug in practice: once cleanup removes
_versionthe version readsnulluntil the next arrival, and the only reader, gutenberg-sync-engines' SSE stream, polls every 0.5s, so it sees1 → nullas a change and rereads the room; missing an arrival would need the cleanup and that arrival inside the same half second.