-
Notifications
You must be signed in to change notification settings - Fork 40
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
Collection.Save CascadeSave bug #36
Comments
What you’re describing here is just the nature of concurrency. I wouldn’t really call this a bug.
If you find yourself saving the same document in multiple different go routines then you probably just need to address that in your application architecture. Can you explain the use case?
Sent via Mobile
…________________________________
From: wxf4150 <[email protected]>
Sent: Tuesday, May 29, 2018 3:51:08 AM
To: go-bongo/bongo
Cc: Subscribed
Subject: [go-bongo/bongo] Collection.Save CascadeSave bug (#36)
Collection.Save(document) method invoke "CascadeSave" using goRoutine.
when i change document's field 10 times and save every times.
the function CascadeSave will invoke 10 times use 10 Routines;
the 10 Routines will not ordered, some Routines will concurrency, then parent doc error
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#36>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AEXD4tsXWMQ_doIkUxOrbjPYruRXYm3jks5t3P3sgaJpZM4UQ_sD>.
|
the end: |
or update this way
the end: |
I could see this being a race condition if there are multiple users updating the same record. Solution seems to be just removing the Can you submit a PR? |
Collection.Save(document) method invoke "CascadeSave" using goRoutine.
when i change document's field 10 times and save every times.
the function CascadeSave will invoke 10 times use 10 Routines;
the 10 Routines will not ordered, some Routines will concurrency, then parent doc error
The text was updated successfully, but these errors were encountered: