-
Notifications
You must be signed in to change notification settings - Fork 677
feat(cdc): record cdc auto schema change failure events in rw_event_log
#23103
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
base: main
Are you sure you want to change the base?
Conversation
@@ -213,6 +213,10 @@ pub fn parse_schema_change( | |||
}; | |||
let id = jsonb_access_field!(jsonb, "id", string); | |||
let ty = jsonb_access_field!(jsonb, "type", string); | |||
// Try to extract table name from the JSON data | |||
let table_name = jsonb_access_field!(jsonb, "id", string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are accessing the "id" field here (duplicate with L214), not the table name
(fail_info, clean_table_name, cdc_table_id) | ||
} else { | ||
let fail_info = | ||
format!("Unsupported postgres type: {:?}", ty); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
} else { | ||
let fail_info = | ||
format!("Unsupported postgres type: {:?}", ty); | ||
(fail_info, "".to_owned(), "".to_owned()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have the source name available in self.source_ctx.source_name
. We should include that in the error message.
"Failed to parse schema change: {:?}", | ||
err.as_report() | ||
); | ||
(fail_info, "".to_owned(), "".to_owned()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
As title
Show cdc auto schema change fail event in rw_event_logs:
Example1: fail due to unsupported type
Example2: fail due to the ddl is not add column or drop column
Checklist
Release note