Skip to content
Snippets Groups Projects
Commit ad98bc50 authored by kruthar's avatar kruthar
Browse files

[mongodb] return OK on updates with w=0

parent 02316063
No related branches found
No related tags found
No related merge requests found
...@@ -462,7 +462,7 @@ public class AsyncMongoDbClient extends DB { ...@@ -462,7 +462,7 @@ public class AsyncMongoDbClient extends DB {
} }
final long res = final long res =
collection.update(query, update, false, false, writeConcern); collection.update(query, update, false, false, writeConcern);
return res == 1 ? Status.OK : Status.NOT_FOUND; return writeConcern == Durability.NONE || res == 1 ? Status.OK : Status.NOT_FOUND;
} catch (final Exception e) { } catch (final Exception e) {
System.err.println(e.toString()); System.err.println(e.toString());
return Status.ERROR; return Status.ERROR;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment