Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40248

OplogEntry's getOperationToApply() returns incorrect field for updates

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 4.0.6, 4.1.9
    • 4.1.11, 4.0.11
    • Replication
    • None
    • Fully Compatible
    • ALL
    • v4.0
    • Repl 2019-04-22, Repl 2019-05-06, Repl 2019-05-20

    Description

      The method getOperationToApply() states that it returns the document corresponding with the write operation for a given OplogEntry object. It asserts furthermore that for updates, this will be the o2 field. For updates, the o2 field will contain the document key – that is, the id (and the shard key if in a sharded cluster).

      For sharding's use of this function, we always need a document that has at least the id and the shard key. The function should be renamed (or more functions should be created) accurately reflect its usages in both applyOps and sharding.

      Bug was introduced in version 3.7.2.

      Attachments

        Issue Links

          Activity

            People

              judah.schvimer@mongodb.com Judah Schvimer
              blake.oler@mongodb.com Blake Oler
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: