Conversation
|
What happens if two collaborators save at roughly the same time? Do we have a race condition there that could cause even bigger problems? |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
In theory, that should be fine. The diff between those two updates should be tiny or empty and similar to what a newly joining or refreshing user should experience. However, it deserves testing in real-world conditions. |
|
Size Change: -24 B (0%) Total Size: 6.84 MB
ℹ️ View Unchanged
|
73089a2 to
a3d84ec
Compare
|
Closing in favor of #75682 due to build/rebase issues |
What?
In the default polling provider, perform compaction using
Y.encodeStateAsUpdateinstead of using a server response.Why?
We have observed some bugginess with the default polling provider that seems aligned with compaction events. In particular, we saw instances of content duplication and we suspect that race conditions between the compaction updates and subsequent updates by the client led to this problem.
How?
Instead of sending updates from the server that need compaction, use
Y.encodeStateAsUpdateto compact using the client's current state. This is a much better approach than combining an arbitrary range of updates from the server's update history.Testing Instructions