Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3709

Investigate changes in SERVER-88158: Remove support for 'alwaysUpsert' in applyOps

    • Type: Icon: Investigation Investigation
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Tools and Replicator
    • We don't use this in the tools.

      Original Downstream Change Summary

      The applyOps command no longer accepts the 'alwaysUpsert' option. Previously, alwaysUpsert would default to true, but now it will always default to false, meaning no update operation in the applyOps array will automatically be upserted.

      Description of Linked Ticket

      Back when we had atomic applyOps, we had an "alwaysUpsert" field in applyOps which would tell secondaries whether a 'u' operation should be treated as an upsert. Confusingly, this field defaults to "true" for applyOps operations without a transaction number. We haven't had atomic applyOps since 6.2, so we should be able to remove support for alwaysUpsert and treat it as always false.

      This will make things easier if we support batching of updates in applyOps entries; right now such updates will be treated as upserts, which, while it should not result in incorrect operation, bypasses checks for consistency.

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: