Misleading Doc Example Code in Transaction Section

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Documentation
    • None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      There is a bug in the c# example code of the transaction section:

      https://docs.mongodb.com/master/core/transactions/?_ga=2.203887700.515816747.1531800617-1973885362.1531800617#retry-transaction-and-commit-operation

      The example source code is at:

      https://github.com/mongodb/mongo-csharp-driver/blob/master/tests/MongoDB.Driver.Examples/TransactionExamplesForDocs/RetryExample3.cs

      At line 88 and line 91, when we're doing the update and insert operations, we should pass `session` as the first parameter, in order to put them in the transaction and demonstrate how the transaction works. And that is the purpose of this example.
       

            Assignee:
            Vincent Kam (Inactive)
            Reporter:
            Ru [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: