Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-3043

Drivers should use maxMessageSizeBytes or 48MB to limit the size of an incoming message

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: OP_MSG
    • None
    • Needed
    • Hide

      Summary of necessary driver changes

      •  

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      •  

      Context for other referenced/linked tickets

      •  
      Show
      Summary of necessary driver changes   Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed)   Context for other referenced/linked tickets  

      Summary

      What is the problem or use case, what are we trying to achieve?

      Clarify what maxMessageSizeBytes should be used for when receiving a message from the server.

      Motivation

      Who is the affected end user?

      Who are the stakeholders?

      • Driver engineers writing networking code.
      • Transiently users if there is something wrong with the message size

      How does this affect the end user?

      Are they blocked? Are they annoyed? Are they confused?

      • As a driver engineer I was unsure what value should be used as a cap on received messages

      How likely is it that this problem or use case will occur?

      Main path? Edge case?

      Main path, every single message.

      If the problem does occur, what are the consequences and how severe are they?

      Minor annoyance at a log message? Performance concern? Outage/unavailability? Failover can't complete?

      The potential problem is reading too much from a socket. However, there should be a hard cap at IN32_MAX given the header format of OP_MSG so there should not be a risk of infinite allocations.

      Is this issue urgent?

      Does this ticket have a required timeline? What is it?

      No not urgent.

      Is this ticket required by a downstream team?

      Needed by e.g. Atlas, Shell, Compass?

      No

      Is this ticket only for tests?

      Does this ticket have any functional impact, or is it just test improvements?

      Prose and a test if deemed worthy.

      Acceptance Criteria

      What specific requirements must be met to consider the design phase complete?

      • Add language (probably here) to clarify that:
        • 48MB should be used as the maximum size for receiving a message until a response from a hello is received
        • After receiving a handshake (hello) response the server's maxMessageSizeBytes value should be used.
      Reference

            Assignee:
            Unassigned Unassigned
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: