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: frontend panics when creating a cdc table with partial columns specified #20223

Open
BugenZhao opened this issue Jan 20, 2025 · 1 comment
Labels
type/bug Something isn't working
Milestone

Comments

@BugenZhao
Copy link
Member

BugenZhao commented Jan 20, 2025

Describe the bug

The frontend node will panic if user's going to create a CDC table with partial columns specified.

Error message/log

dev=> create table tttt (k int primary key) from pg_source table 'public.tttt';
ERROR:  Panicked when handling the request: assertion `left == right` failed
  left: 1
 right: 2
This is a bug. We would appreciate a bug report at:
  https://github.com/risingwavelabs/risingwave/issues/new?labels=type%2Fbug&template=bug_report.yml
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.

To Reproduce

In upstream Postgres:

create table tttt (k int primary key, v int);

In RisingWave:

dev=> create source pg_source with (
 connector = 'postgres-cdc',
 hostname = 'localhost',
 port = '5432',
 username = 'bugenzhao',
 password = '',
 database.name = 'postgres',
 slot.name = 'pg_slot'
);
CREATE_SOURCE
dev=> create table tttt (k int primary key) from pg_source table 'public.tttt';
ERROR:  Panicked when handling the request: assertion `left == right` failed
  left: 1
 right: 2
This is a bug. We would appreciate a bug report at:
  https://github.com/risingwavelabs/risingwave/issues/new?labels=type%2Fbug&template=bug_report.yml
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.

Expected behavior

Not panic but accept with verification on the validity of user specified partial schema.

How did you deploy RisingWave?

No response

The version of RisingWave

main

Additional context

Panicked at:

for (col, external_col) in
columns.iter_mut().zip_eq_fast(external_columns.into_iter())
{
col.column_desc.generated_or_default_column =
external_col.column_desc.generated_or_default_column;
}

Seems to be introduced by #19354. Unreleased as for now. Released versions work correctly.

@BugenZhao BugenZhao added the type/bug Something isn't working label Jan 20, 2025
@github-actions github-actions bot added this to the release-2.3 milestone Jan 20, 2025
@BugenZhao
Copy link
Member Author

Let's see if we can reuse some code of #20203

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

No branches or pull requests

1 participant