[DocDB] Maximums on row sizes should be added/enforced #23636
Labels
area/docdb
YugabyteDB core features
kind/enhancement
This is an enhancement of an existing feature
priority/low
Low priority
Jira Link: DB-12549
Description
It is currently possible to create rows that are multiple GB in size:
The size of each column is bounded by
rpc_max_message_size
(each query is individually bounded by this). Specifying the primary key allows us to avoid a read of the row, which would otherwise cap the row size at~2 * rpc_max_message_size
(which is still problematic).This leads to issues later on when the row is read in full (from a SELECT *, index backfill, etc.) -- the read response will blow past
rpc_max_message_size
and cause the read to fail. This was also the cause of #22301.It is also difficult to find the large row in question, since reading the entire row to find its size also fails.
rpc_max_message_size
is limited by limitations from the protobuf library to values under 512MB, so it's also not an option to simply increaserpc_max_message_size
to be larger than the largest row.As we cannot properly handle these very large rows, we should have checks to prevent these rows from being written in the first place. A possible value for max row size would be a bit less than half of
rpc_max_message_size
, which would let us ensure that we never hitrpc_max_message_size
responding to a read request, by cappingyb_fetch_size_limit
to the max row size.Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information
The text was updated successfully, but these errors were encountered: