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

Document size limit can cause idempotency issues

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

      Initial document state: {}

      Oplog entries:

      1: {$set: {a: '15MB string'}}
      2: {$set: {a: ''}}
      3: {$set: {b: '15MB string}}
      

      Final state:

      {a: '', b: '15MB string'}

      Note that at no point is the document more than 16MB so this is a valid sequence of events from the primary's perspective.

      If we start applying Oplog entry 1 to the final document (which initial sync assumes is valid) we will have a document temporarily larger than 16MB which will cause an error and abort the server.

            Assignee:
            Unassigned Unassigned
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: