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

Field order for numeric paths in embedded documents is inconsistent when $set replicates between 4.4 and 5.0

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.0.0
    • Component/s: Replication, Write Ops
    • Labels:
    • Query Execution
    • ALL

      The changes from SERVER-50778 (5.0) made it so $set applies numeric paths in numerical sort order. In 4.4, $set applies numeric paths in lexicographical sort order. https://www.mongodb.com/docs/manual/release-notes/5.0-compatibility/#update-operator-processing-order

      The changes from SERVER-50778 were neither guarded on the 5.0 primary node by its feature compatibility version, nor were the changes to how the oplog entry instructions ought to be interpreted by secondaries made explicit in the oplog entry itself. This ambiguity allows a 4.4 secondary node to receive the oplog entry instructions and apply them differently than the 5.0 primary node had originally done. The reverse is also true; a 5.0 secondary node can receive the oplog entry instructions from a 4.4 primary node and apply them differently than the 4.4 primary node had originally done.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: