Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-423

WriteConcern should return null for default "w" option

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.0.0-beta2
    • Affects Version/s: 1.0.0-beta1
    • Component/s: None
    • None

      mongoc_write_concern_set_w() fails as a NOP if the w value is < -3. To recap, these are the defined values:

      #define MONGOC_WRITE_CONCERN_W_UNACKNOWLEDGED  0
      #define MONGOC_WRITE_CONCERN_W_ERRORS_IGNORED -1  /* deprecated */
      #define MONGOC_WRITE_CONCERN_W_DEFAULT        -2
      #define MONGOC_WRITE_CONCERN_W_MAJORITY       -3
      #define MONGOC_WRITE_CONCERN_W_TAG            -4
      

      Currently, our debug handler omits w from its output if it is -2 (i.e. default). I propose we instead return NULL, as we do for fsync and journal.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: