-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: add TenantReadOnly cluster setting to restrict returned MigratableSession size #77302
Description
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 serialized
session. 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