-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates not getting materialized #281
Comments
The difference between |
The entries and operations sent by 1. CREATE Entry:
Operation:
2. UPDATE Entry:
Operation:
3. UPDATE Entry:
Operation:
|
|
My theory is that the UPDATEs sometimes arrive on the node while the CREATE operation is being worked on. They unexpectedly do not get rescheduled / get lost after the creation of the document succeeded. Our task queue logic exists exactly for the reason to account for such out-of-order events (actually not for performance reasons primarily as one might think 😝), so I assume something is fishy here. |
Unfortunately, i can't reproduce this locally.... thanks for the nice bug reproduction steps though, was a pleasure trying 🤣 |
Sending a delayed (2,5 seconds) operation as a third UPDATE (setting await new Promise((resolve) => {
setTimeout(resolve, 2500);
});
await message.update({
message: '4',
}); |
Running the tests against this fix #283 makes the results "better" but doesn't fix the problem. More values converge to the right final value, but still there are some false ones. |
Sending a CREATE operation, followed by 2 UPDATE operations do sometimes not get materialized:
.. the playground sometimes materializes only up to
1
, sometimes2
, sometimes3
:Steps to reproduce:
document-orm
branch inshirokuma
: https://github.com/p2panda/shirokuma/tree/document-orm, build the package vianpm run build
aquadoggo
frommain
w. new databasesend-to-node
fromdebug-js
branch./debug.sh
insend-to-node
(this creates achat
schema and adds a chat document with two updates, materialization seems to work normally here)shirokuma
project, runnode ./debug.js
here (tested in NodeJS v17)message
value3
, run step 5 a couple of times and compare, sometimes its1
, sometimes its2
, sometimes its3
The text was updated successfully, but these errors were encountered: