Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1860

Standardize on :write_concern for write concern options

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.10.0.rc0
    • None
    • None
    • Fully Compatible

    Description

      Currently database, collection and gridfs take write concern as :write option while session and operations take it as :write_concern option. This discrepancy is error-prone because lower level code does not error when given :write option, but silently behaves not as expected. Similarly collection will accept :write_concern and ignore it. Additionally we do not have great documentation explaining this difference.

      Since :write_concern seems to be a better name choice compared to :write, this ticket proposes to add :write_concern to collection and client options as an alternative to :write, so that applications can use :write_concern everywhere.

      Important points:

      • Client and collection will accept both :write and :write_concern.
      • If both are given together, their values must be identical or an exception will be raised.
      • Whatever option is given by the caller will be stored (i.e. at this point the driver will not replace the key name in options).

      Attachments

        Issue Links

          Activity

            People

              oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
              oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: