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

changefeedccl: error on duplicate targets #79465

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

HonoreDB
Copy link
Contributor

@HonoreDB HonoreDB commented Apr 5, 2022

Previously, behavior if you gave two equivalent targets in a changefeed
was undefined. This PR adds validation and an error.

For example,
use defaultdb; CREATE CHANGEFEED FOR defaultdb.foo, TABLE foo will
error and give the canonicalized targets that resolved to the same
table. You can still do FOR db1.foo, db2.foo as those will resolve
to different tables even though they may emit to the same topic.

Closes #78285

Release note (sql change): Changefeed statements now detect duplicate targets and throw an error.

@HonoreDB HonoreDB requested a review from a team April 5, 2022 22:00
@HonoreDB HonoreDB requested a review from a team as a code owner April 5, 2022 22:00
@HonoreDB HonoreDB requested review from msbutler and miretskiy and removed request for a team April 5, 2022 22:00
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Previously, behavior if you gave two equivalent targets in a changefeed
was undefined. This PR adds validation and an error.

For example,
`use defaultdb; CREATE CHANGEFEED FOR defaultdb.foo, TABLE foo` will
error and give the canonicalized targets that resolved to the same
table. You can still do `FOR db1.foo, db2.foo` as those will resolve
to different tables even though they may emit to the same topic.

Release note (sql change): Changefeed statements now detect duplicate targets and throw an error.
@HonoreDB
Copy link
Contributor Author

HonoreDB commented Apr 7, 2022

bors r=[miretskiy, shermanCRL]

@irfansharif
Copy link
Contributor

bors r-

(Failing linters)

@craig
Copy link
Contributor

craig bot commented Apr 7, 2022

Canceled.

@HonoreDB HonoreDB force-pushed the error_on_duplicate_targets branch from f5096a9 to 2111741 Compare April 7, 2022 15:43
@HonoreDB
Copy link
Contributor Author

HonoreDB commented Apr 7, 2022

Sorry, forgot to push the style fix.

@HonoreDB
Copy link
Contributor Author

HonoreDB commented Apr 7, 2022

bors r+

@craig
Copy link
Contributor

craig bot commented Apr 7, 2022

Build succeeded:

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.

changefeedccl: error when user duplicates targets
4 participants