Write concern is behaving unexpectably

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.9.3
    • Component/s: API
    • Environment:
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hi,
      I encounter strange behaviour regarding the writeResult.getN() returned value.

      The first save to a DBCollection seems to be failing, writeResult.getN() being != 1, but in fact, it does save the object, a subsequent find() proves it (see the attache test class, the method theTest).

      After a seemingly failled save, a second save actually return writeResult.getN() being == 1 (see theSecondTest).

      Did I do/understood something wrong?

      Thanks for your precious help!
      Brice.

              Assignee:
              Unassigned
              Reporter:
              Brice Laurencin
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: