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

Batch write size estimation logic on mongos doesn't account for top-level command fields

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL

      The logic we use right now on mongos to determine whether adding a write to a batch would make a batch too big only takes into account the total estimated size of each individual write operation so far. We do not appear to take into account the size of top-level command fields, for example let on an update command, but we likely should.

      Relevant logic:

      We are going to factor in such fields for the bulkWrite command specifically in SERVER-73536 but it seems we might want to make similar changes for insert/update/delete as well.

      SERVER-74806 was a recent case where $merge generated a too-large internal update command because its similar logic did not factor in let and legacy runtime constants.

      This is somewhat related to SERVER-53387 though that is about factoring in metadata size.

            Assignee:
            Unassigned Unassigned
            Reporter:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: