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

Do not add fromMigrate field to applyOps insert oplog entries

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4.0-rc2, 4.7.0
    • Component/s: Replication, Write Ops
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.4
    • Sprint:
      Repl 2019-11-18, Repl 2019-12-02, Repl 2020-03-23, Repl 2020-04-06

      Description

      SERVER-42630 describes a case where an update entry will be written to the oplog as part of an applyOps but the actual performed operation may be an insert. This can be misleading or wrong for change streams. Currently change streams ignore user-generated applyOps entries but SERVER-42845 tracks the work to change that.

      There are some comment threads on that ticket describing why, and Judah Schvimer offers a proposed solution in this comment.

        Attachments

        1. apply_ops_upsert_with_migrate_and_delete.js
          5 kB
        2. apply_ops_upsert_with_migrate.js
          3 kB
        3. apply_ops_upsert.js
          3 kB

          Issue Links

            Activity

              People

              Assignee:
              jason.chan Jason Chan
              Reporter:
              charlie.swanson Charlie Swanson
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: