-
Notifications
You must be signed in to change notification settings - Fork 56
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
Couch breaks with concurrent saves #113
Comments
Otoh I just realized this could be used as a crude semaphore. If !id return an error right away or better yet make the callback wait, return a error and the new document. |
The couch engine should be using the _rev property for updating the same document multiple times. If you can you provide a runnable code example or test reproducing the issue, I'd be glad to help you get it to work. Thanks! |
Well, the scenario is fairly simple but requires multiple code paths share the same object instance. If the following sequence runs: The 2nd save will find a obj without id but doesn't fail, instead it just creates a fresh duplicate under some new id. |
If you can you provide a runnable code example or test reproducing the issue, I'd be glad to help you get it to work. |
put alters the original doc which means a save on the object will fail and create a duplicate cause we're saving a document without id. I'm not sure of the way to go here. Make a deep copy of the doc in put ?
The text was updated successfully, but these errors were encountered: