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
- related to
-
NODE-5800 [Follow up work] Investigate driver requirements for limiting the size of incoming messages
- Backlog