-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Replication observation mode ignored when push handler is waiting for response from backend #5571
Comments
Further confirming my suspicion, if I
|
Thank you for reporting, I will try to build a test case for that. |
Could reproduce, working on a fix |
@pubkey sorry for the delay, just wanted to circle back and confirm that the new version is working as expected. Thanks again! |
Have you found a bug?
Yes, a race condition that is not possible to replicate with a unit test alone. Another user in Discord noted a similar issue and I have confirmed the issue by placing breakpoints in code to simulate the desired order of operations.
The result of that:
Root cause
It appears that documents emitted to the pull stream, while the push handler is still waiting for a response from the server, are ignored and never applied to the local db. I have to imagine this has to do with some sort of locking mechanism that the collection employs during the push operation. Unless I missed a critical piece of the documentation... this issue is a possible race condition in the normal replication workflow.
Do you have a feature request?
Would be happy to contribute a PR with a small nudge in the right direction (just need a general area of the code start from).
The text was updated successfully, but these errors were encountered: