mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 13:36:48 +00:00
c63ec5e285
An online edit that has to queue behind an older write to the same entity starts a flush so it goes out right after that write. When the older write was already in flight, flush() returned at once on the in-tab flag, and the running pass had read its pending rows before the new one existed. The edit then sat in the queue until the next trigger (the 30 second tick, a visibility change or a reconnect), so collaborators saw it late and a refresh in that window showed the older server value. A flush called while a pass runs now asks that pass for one more round, which it starts once it is done, next to the existing "mine wins" re-run. Each pass clears the request when it starts, so the extra rounds stay bounded by the calls made during a pass.