sql: add TenantReadOnly cluster setting to restrict returned MigratableSession size #77302
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
This is related to the on-going connection migration work.
Is your feature request related to a problem? Please describe.
We currently have the
SHOW TRANSFER STATE
statement returning data for serializedsession. However, we don't restrict the returned data size, which means that the user of
this (i.e. SQL Proxy) would need to manually guard the returned data to make sure that
we don't deserialize everything into the proxy's memory.
Describe the solution you'd like
We'd like a TenantReadOnly cluster setting that changes the behavior of serializeSessionState
to return an error whenever the total bytes for the MigratableSession proto exceeds this value.
Additional context
See discussion on Slack within the Serverless Engineering channel.
cc: @rafiss @jeffswenson
Jira issue: CRDB-13522
Epic CRDB-10457
The text was updated successfully, but these errors were encountered: