Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: add TenantReadOnly cluster setting to restrict returned MigratableSession size #77302

Closed
jaylim-crl opened this issue Mar 2, 2022 · 0 comments · Fixed by #77307
Closed
Assignees
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)

Comments

@jaylim-crl
Copy link
Collaborator

jaylim-crl commented Mar 2, 2022

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

@jaylim-crl jaylim-crl added 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) labels Mar 2, 2022
@rafiss rafiss self-assigned this Mar 2, 2022
@craig craig bot closed this as completed in #77307 Mar 3, 2022
@craig craig bot closed this as completed in 960f2b4 Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants