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
If you use an asynchronous beforeHandleMessage hook, you will very likely have messages handled out-of-order. In here there's no mechanism for guaranteeing processing order.
In many cases this is not an issue, but sometimes it leads to inconsistent transient states when processing Y.js updates out of order. I'm not sure what other effects this may have, as this affects all other incoming WebSocket messages as well.
My suggestion would be to guarantee processing order using a queue mechanism.
Steps to reproduce the bug
Add an asynchronous beforeHandleMessage hook. For worst case, add big random delays in your hook to mess up message processing order totally.
Expected behavior
I would expect messages to be processed FIFO.
The text was updated successfully, but these errors were encountered:
Description
If you use an asynchronous
beforeHandleMessage
hook, you will very likely have messages handled out-of-order. In here there's no mechanism for guaranteeing processing order.In many cases this is not an issue, but sometimes it leads to inconsistent transient states when processing Y.js updates out of order. I'm not sure what other effects this may have, as this affects all other incoming WebSocket messages as well.
My suggestion would be to guarantee processing order using a queue mechanism.
Steps to reproduce the bug
Add an asynchronous
beforeHandleMessage
hook. For worst case, add big random delays in your hook to mess up message processing order totally.Expected behavior
I would expect messages to be processed FIFO.
The text was updated successfully, but these errors were encountered: