-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
Summary
Commands that write replicated database data should support accepting a write concern.
Motivation
In the earlier versions of MongoDB, the getLastError command is the only way for the user to wait until a write has been replicated to at least the specified amount of nodes. However, the semantics of this command is that it will wait for the last write on the current connection. This means that each connection needs to keep a state for remembering the last write. If commands that do writes accept a write concern, then the extra bookkeeping will be unnecessary and it will also reduce the amount of round trip to perform the same task by one. As of v3.2, there are a subset of commands that already accepts writeConcern as one of it’s parameters. These are the write commands, auth related commands that do database writes and findAndModify.
Documentation
- duplicates
-
DOCS-7637 Commands that take a writeConcern
- Closed