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

bug: altering table column failed when table is built upon a shared cdc source #16287

Closed
Tracked by #11079
yezizp2012 opened this issue Apr 12, 2024 · 6 comments · Fixed by #17334
Closed
Tracked by #11079

bug: altering table column failed when table is built upon a shared cdc source #16287

yezizp2012 opened this issue Apr 12, 2024 · 6 comments · Fixed by #17334
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@yezizp2012
Copy link
Member

yezizp2012 commented Apr 12, 2024

Describe the bug

Altering table column failed when table is built upon a shared cdc source.

dev=> CREATE SOURCE test_db WITH (connector = 'mysql-cdc', hostname = 'localhost', port = '3306', username = 'root', password = '', database.name = 'test', server.id = '5888', debezium.snapshot.mode = 'schema_only_recovery', debezium.snapshot.locking.mode = 'none');
CREATE_SOURCE
dev=> CREATE TABLE cdc_object (oid INT, obj_type VARCHAR, PRIMARY KEY (oid)) WITH (snapshot = true) FROM test_db TABLE 'test.object';
CREATE_TABLE
dev=> alter table cdc_object add column owner_id int;
ERROR:  Failed to run the query

Caused by these errors (recent errors listed first):
  1: gRPC request to meta service failed: Internal error
  2: Different number of internal tables. New: 0, Old: 1

Error message/log

No response

To Reproduce

No response

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@yezizp2012 yezizp2012 added the type/bug Something isn't working label Apr 12, 2024
@github-actions github-actions bot added this to the release-1.9 milestone Apr 12, 2024
@yezizp2012
Copy link
Member Author

yezizp2012 commented Apr 15, 2024

The root cause is that the cdc table info in CreateTable statement is unhandled, which result in wrong streaming graph for new table. Then the internal tables will be mismatched. Cc @StrikeW @BugenZhao .

  1. We should pass the correct streaming graph to meta.
  2. When building the fragment graph, it is necessary to add the actor information of the upstream source. Need to add a new function in CompleteStreamFragmentGraph like with_upstreams_and_downstreams.
  3. Add necessary altering tests.

btw, include_column_options is also not handled.

@yezizp2012
Copy link
Member Author

Any updates? 👀

@StrikeW
Copy link
Contributor

StrikeW commented May 7, 2024

Not yet. I am busy with adapting postgres data types last week. Will take a look soon.

@StrikeW
Copy link
Contributor

StrikeW commented May 7, 2024

Any updates? 👀

If it is required by a POC user, I suggest you to note it down in the Notion. @yezizp2012

@yezizp2012
Copy link
Member Author

Any updates? 👀

If it is required by a POC user, I suggest you to note it down in the Notion. @yezizp2012

Nope, it was just reported from community. You can take your time.

@KeXiangWang
Copy link
Contributor

I'll take this but do it later. Still busy with sql server cdc recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants