Skip to content
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

[mongodb] return OK on updates with w=0 #759

Merged
merged 1 commit into from
Jun 21, 2016

Conversation

kruthar
Copy link
Collaborator

@kruthar kruthar commented Jun 3, 2016

in #746 it was found that when using the mongodb-async binding with a write concern of w=0 then update operations will always return -1 which in turn reports an operation status of NOT_FOUND.

Since you cannot tell what the result of the update operation is whne you fire and forget, it is reasonable to just return success for all update operations in the mongodb-async binding when using a write concern of w=0.

@busbey
Copy link
Collaborator

busbey commented Jun 20, 2016

would BATCHED_OK be more appropriate? @allanbank, have an opinion?

I'm +1 with the change as is, or with BATCHED_OK instead.

@allanbank
Copy link
Collaborator

@busbey - I think the OK status is a closer fit than BATCHED_OK. The operation is successful to the level of durability that the user requested.

@busbey
Copy link
Collaborator

busbey commented Jun 21, 2016

Works for me!

@busbey busbey merged commit ca1ec19 into brianfrankcooper:master Jun 21, 2016
@busbey busbey mentioned this pull request Jun 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants