Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-7412

Comment on: "manual/tutorial/perform-two-phase-commits.txt"

    XMLWordPrintableJSON

Details

    Description

      in https://docs.mongodb.org/manual/tutorial/perform-two-phase-commits/#initialize-source-and-destination-accounts there is a typo in the demo code.

      It seems that both accounts have their balance temporarily increased. Perhaps it should read:

      ```
      db.accounts.insert(
      [

      { _id: "A", balance: -1000, pendingTransactions: [] }

      ,

      { _id: "B", balance: 1000, pendingTransactions: [] }

      ]
      )
      ```

      (Note that balance 'A' should be -ve)

      Attachments

        Activity

          People

            Unassigned Unassigned
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 48 weeks, 2 days ago