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

streamingccl: add WITH RETENTION option to CREATE TENANT #94001

Merged
merged 1 commit into from
Dec 21, 2022

Conversation

stevendanna
Copy link
Collaborator

This adds an WITH RETENTION = 'duration' option to CREATE TENANT to allow the user to set the retention window at replication stream creation time.

A future commit will support updating this option via SET as well.

Informs: #93441

Release note: None

@stevendanna stevendanna requested review from a team as code owners December 20, 2022 19:15
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@lidorcarmel lidorcarmel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, just some nagging questions..

{
$$.val = $2.tenantReplicationOptions()
}
| WITH OPTIONS '(' tenant_replication_options_list ')'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we can also do CREATE TENANT .. FROM REPLICATION OF .. ON .. WITH OPTIONS (RETENTION = 36h); right? can you add a test for that syntax? or maybe we can wait for the data driven tests for that?

btw is that standard to support both WITH X = y and WITH OPTIONS (X = y)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a parser test.

The WITH OPTIONS (X =y) is also supported by BACKUP and RESTORE so I supported it here for consistency.

This adds an WITH RETENTION = 'duration' option to CREATE TENANT to
allow the user to set the retention window at replication stream
creation time.

A future commit will support updating this option via SET as well.

Informs: cockroachdb#93441

Release note: None
@stevendanna stevendanna force-pushed the create-tenant-with-retention branch from 1ab6b74 to 16ed89c Compare December 20, 2022 21:13
@stevendanna
Copy link
Collaborator Author

bors r=lidorcarmel

@craig
Copy link
Contributor

craig bot commented Dec 21, 2022

Build succeeded:

@craig craig bot merged commit 10266a3 into cockroachdb:master Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants