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

WriteConcern debug output ignores all fields for w default

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.2.0
    • Affects Version/s: 0.1.5
    • Component/s: None
    • None

      When w is -2 (libmongoc's default), our debug handler hides rendering of other fields in the debug output. This is especially problematic because explicitly providing w=1 to libmongoc (e.g. in URI options) results in -2 being stored. I assume the current behavior was added by thinking MONGOC_WRITE_CONCERN_W_DEFAULT meant the entire write concern was defaulted (not just w).

      It would be more straightforward if we always print all fields. Additionally, I think we can still render w as "majority" alongside our synthetic wmajority boolean field, since that is the actual value being passed in w. Users can still rely on our boolean to avoid a string comparison check.

            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: