Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-8300

Commands that write should take a write concern

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • 3.4 Core Server
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Project Summary, Updated 2016-04-13

      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

      Scope Document
      Design Document

            Assignee:
            andrew.aldridge@mongodb.com Andrew Aldridge
            Reporter:
            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              7 years, 32 weeks, 4 days ago